/** {@inheritDoc} */ protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { ConfirmationMethod confirmationMethod = (ConfirmationMethod) samlObject; XMLHelper.appendTextContent(domElement, confirmationMethod.getConfirmationMethod()); } }
/** * Get subject confirmation method of the given SAML 1.1 Assertion. * This is used in rampart-core. * @param assertion SAML 1.1 Assertion * @return subject confirmation method */ public static String getSAML11SubjectConfirmationMethod(Assertion assertion) { String subjectConfirmationMethod = RahasConstants.SAML11_SUBJECT_CONFIRMATION_HOK; // iterate the statements and get the subject confirmation method. List<Statement> statements = assertion.getStatements(); // TODO check whether there is an efficient method of doing this if (!statements.isEmpty()) { SubjectStatement subjectStatement = (SubjectStatement) statements.get(0); Subject subject = subjectStatement.getSubject(); if (subject != null) { SubjectConfirmation subjectConfirmation = subject.getSubjectConfirmation(); if (subjectConfirmation != null) { List<ConfirmationMethod> confirmationMethods = subjectConfirmation.getConfirmationMethods(); if (!confirmationMethods.isEmpty()) { subjectConfirmationMethod = confirmationMethods.get(0).getConfirmationMethod(); } } } } return subjectConfirmationMethod; }
if (data instanceof ConfirmationMethod) { ConfirmationMethod method = (ConfirmationMethod) data; methods.add(method.getConfirmationMethod()); methods.add(confirmationMethod.getConfirmationMethod());
if (data instanceof ConfirmationMethod) { ConfirmationMethod method = (ConfirmationMethod) data; methods.add(method.getConfirmationMethod()); methods.add(confirmationMethod.getConfirmationMethod());
List<ConfirmationMethod> confirmationMethods = subjectConfirmation.getConfirmationMethods(); for (ConfirmationMethod confirmationMethod : confirmationMethods) { if (OAuthConstants.OAUTH_SAML1_BEARER_METHOD.equals(confirmationMethod.getConfirmationMethod())) { bearerFound = true;
List<ConfirmationMethod> confirmationMethods = subjectConfirmation.getConfirmationMethods(); for (ConfirmationMethod confirmationMethod : confirmationMethods) { if (OAuthConstants.OAUTH_SAML1_BEARER_METHOD.equals(confirmationMethod.getConfirmationMethod())) { bearerFound = true;