/** * write an {@code SubjectType} to stream * * @param subject * @param out * @throws ProcessingException */ public void write(SAML11SubjectType subject) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, JBossSAMLConstants.SUBJECT.get(), SAML11Constants.ASSERTION_11_NSURI); StaxUtil.writeNameSpace(writer, ASSERTION_PREFIX, ns); SAML11SubjectTypeChoice choice = subject.getChoice(); if (choice != null) { SAML11NameIdentifierType nameid = choice.getNameID(); if (nameid != null) { write(nameid); } SAML11SubjectConfirmationType confirmation = choice.getSubjectConfirmation(); if (confirmation != null) write(confirmation); } SAML11SubjectConfirmationType confirmation = subject.getSubjectConfirmation(); if (confirmation != null) write(confirmation); StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }
SAML11SubjectType subject = new SAML11SubjectType(); subject.setChoice(subChoice); subject.setSubjectConfirmation(subjectConfirmationType);
SAML11ProtocolContext saml11Protocol = new SAML11ProtocolContext(); saml11Protocol.setIssuerID(getIdentityURL()); SAML11SubjectType subject = new SAML11SubjectType(); SAML11SubjectType.SAML11SubjectTypeChoice subjectChoice = new SAML11SubjectType.SAML11SubjectTypeChoice(new SAML11NameIdentifierType( userPrincipal.getName())); subject.setChoice(subjectChoice); saml11Protocol.setSubjectType(subject);
SAML11AuthenticationStatementType subStat = (SAML11AuthenticationStatementType) statement; SAML11SubjectType subject = subStat.getSubject(); username = subject.getChoice().getNameID().getValue();
SAML11ProtocolContext saml11Protocol = new SAML11ProtocolContext(); saml11Protocol.setIssuerID(getIdentityURL()); SAML11SubjectType subject = new SAML11SubjectType(); SAML11SubjectType.SAML11SubjectTypeChoice subjectChoice = new SAML11SubjectType.SAML11SubjectTypeChoice(new SAML11NameIdentifierType( userPrincipal.getName())); subject.setChoice(subjectChoice); saml11Protocol.setSubjectType(subject);
SAML11AuthenticationStatementType subStat = (SAML11AuthenticationStatementType) statement; SAML11SubjectType subject = subStat.getSubject(); username = subject.getChoice().getNameID().getValue();
SAML11SubjectType subject = new SAML11SubjectType(); subject.setChoice(subChoice); subject.setSubjectConfirmation(subjectConfirmationType);
SAML11ProtocolContext saml11Protocol = new SAML11ProtocolContext(); saml11Protocol.setIssuerID(getIdentityURL()); SAML11SubjectType subject = new SAML11SubjectType(); SAML11SubjectType.SAML11SubjectTypeChoice subjectChoice = new SAML11SubjectType.SAML11SubjectTypeChoice(new SAML11NameIdentifierType( userPrincipal.getName())); subject.setChoice(subjectChoice); saml11Protocol.setSubjectType(subject);
/** * write an {@code SubjectType} to stream * * @param subject * @param out * * @throws ProcessingException */ public void write(SAML11SubjectType subject) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, JBossSAMLConstants.SUBJECT.get(), SAML11Constants.ASSERTION_11_NSURI); StaxUtil.writeNameSpace(writer, ASSERTION_PREFIX, ns); SAML11SubjectTypeChoice choice = subject.getChoice(); if (choice != null) { SAML11NameIdentifierType nameid = choice.getNameID(); if (nameid != null) { write(nameid); } SAML11SubjectConfirmationType confirmation = choice.getSubjectConfirmation(); if (confirmation != null) write(confirmation); } SAML11SubjectConfirmationType confirmation = subject.getSubjectConfirmation(); if (confirmation != null) write(confirmation); StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }
SAML11AuthenticationStatementType subStat = (SAML11AuthenticationStatementType) statement; SAML11SubjectType subject = subStat.getSubject(); principal = new SerializablePrincipal(subject.getChoice().getNameID().getValue());
StaxParserUtil.getNextEvent(xmlEventReader); SAML11SubjectType subject = new SAML11SubjectType(); subject.setChoice(subChoice); } else if (JBossSAMLConstants.SUBJECT_CONFIRMATION.get().equalsIgnoreCase(tag)) { SAML11SubjectConfirmationType subjectConfirmationType = SAML11ParserUtil .parseSAML11SubjectConfirmation(xmlEventReader); subject.setSubjectConfirmation(subjectConfirmationType); } else throw logger.parserUnknownTag(tag, peekedElement.getLocation());
SAML11ProtocolContext saml11Protocol = new SAML11ProtocolContext(); saml11Protocol.setIssuerID(getIdentityURL()); SAML11SubjectType subject = new SAML11SubjectType(); SAML11SubjectTypeChoice subjectChoice = new SAML11SubjectTypeChoice(new SAML11NameIdentifierType( userPrincipal.getName())); subject.setChoice(subjectChoice); saml11Protocol.setSubjectType(subject);
/** * write an {@code SubjectType} to stream * * @param subject * @param out * @throws ProcessingException */ public void write(SAML11SubjectType subject) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, JBossSAMLConstants.SUBJECT.get(), SAML11Constants.ASSERTION_11_NSURI); StaxUtil.writeNameSpace(writer, ASSERTION_PREFIX, ns); SAML11SubjectTypeChoice choice = subject.getChoice(); if (choice != null) { SAML11NameIdentifierType nameid = choice.getNameID(); if (nameid != null) { write(nameid); } SAML11SubjectConfirmationType confirmation = choice.getSubjectConfirmation(); if (confirmation != null) write(confirmation); } SAML11SubjectConfirmationType confirmation = subject.getSubjectConfirmation(); if (confirmation != null) write(confirmation); StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }
SAML11AuthenticationStatementType subStat = (SAML11AuthenticationStatementType) statement; SAML11SubjectType subject = subStat.getSubject(); principal = new SerializablePrincipal(subject.getChoice().getNameID().getValue());
StaxParserUtil.getNextEvent(xmlEventReader); SAML11SubjectType subject = new SAML11SubjectType(); subject.setChoice(subChoice); } else if (JBossSAMLConstants.SUBJECT_CONFIRMATION.get().equalsIgnoreCase(tag)) { SAML11SubjectConfirmationType subjectConfirmationType = SAML11ParserUtil .parseSAML11SubjectConfirmation(xmlEventReader); subject.setSubjectConfirmation(subjectConfirmationType); } else throw logger.parserUnknownTag(tag, peekedElement.getLocation());
SAML11ProtocolContext saml11Protocol = new SAML11ProtocolContext(); saml11Protocol.setIssuerID(getIdentityURL()); SAML11SubjectType subject = new SAML11SubjectType(); SAML11SubjectTypeChoice subjectChoice = new SAML11SubjectTypeChoice(new SAML11NameIdentifierType( userPrincipal.getName())); subject.setChoice(subjectChoice); saml11Protocol.setSubjectType(subject);
/** * write an {@code SubjectType} to stream * * @param subject * @param out * @throws ProcessingException */ public void write(SAML11SubjectType subject) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, JBossSAMLConstants.SUBJECT.get(), SAML11Constants.ASSERTION_11_NSURI); StaxUtil.writeNameSpace(writer, ASSERTION_PREFIX, ns); SAML11SubjectTypeChoice choice = subject.getChoice(); if (choice != null) { SAML11NameIdentifierType nameid = choice.getNameID(); if (nameid != null) { write(nameid); } SAML11SubjectConfirmationType confirmation = choice.getSubjectConfirmation(); if (confirmation != null) write(confirmation); } SAML11SubjectConfirmationType confirmation = subject.getSubjectConfirmation(); if (confirmation != null) write(confirmation); StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }
SAML11AuthenticationStatementType subStat = (SAML11AuthenticationStatementType) statement; SAML11SubjectType subject = subStat.getSubject(); username = subject.getChoice().getNameID().getValue();
StaxParserUtil.getNextEvent(xmlEventReader); SAML11SubjectType subject = new SAML11SubjectType(); subject.setChoice(subChoice); } else if (JBossSAMLConstants.SUBJECT_CONFIRMATION.get().equalsIgnoreCase(tag)) { SAML11SubjectConfirmationType subjectConfirmationType = SAML11ParserUtil .parseSAML11SubjectConfirmation(xmlEventReader); subject.setSubjectConfirmation(subjectConfirmationType); } else throw logger.parserUnknownTag(tag, peekedElement.getLocation());
SAML11ProtocolContext saml11Protocol = new SAML11ProtocolContext(); saml11Protocol.setIssuerID(getIdentityURL()); SAML11SubjectType subject = new SAML11SubjectType(); SAML11SubjectTypeChoice subjectChoice = new SAML11SubjectTypeChoice(new SAML11NameIdentifierType( userPrincipal.getName())); subject.setChoice(subjectChoice); saml11Protocol.setSubjectType(subject);