/** {@inheritDoc} */ protected void processElementContent(XMLObject samlObject, String elementContent) { ConfirmationMethod confirmationMethod = (ConfirmationMethod) samlObject; confirmationMethod.setConfirmationMethod(elementContent); } }
/** * Creates the subject confirmation method. * Relevant XML element would look like as follows, * <pre> <saml:ConfirmationMethod> * urn:oasis:names:tc:SAML:1.0:cm:holder-of-key * </saml:ConfirmationMethod></pre> * @param confirmationMethod Name of the actual confirmation method. Could be * holder-of-key - "urn:oasis:names:tc:SAML:1.0:cm:holder-of-key" * sender-vouches - "urn:oasis:names:tc:SAML:1.0:cm:sender-vouches" * bearer - TODO * @return Returns the opensaml representation of the ConfirmationMethod. * @throws TrustException If unable to find appropriate XMLObject builder for confirmation QName. */ public static ConfirmationMethod createSubjectConfirmationMethod(final String confirmationMethod) throws TrustException { ConfirmationMethod confirmationMethodObject = (ConfirmationMethod)CommonUtil.buildXMLObject(ConfirmationMethod.DEFAULT_ELEMENT_NAME); confirmationMethodObject.setConfirmationMethod(confirmationMethod); return confirmationMethodObject; }
private Subject newSubject(final String identifier) { final SubjectConfirmation confirmation = newSamlObject(SubjectConfirmation.class); final ConfirmationMethod method = newSamlObject(ConfirmationMethod.class); method.setConfirmationMethod(CONFIRMATION_METHOD); confirmation.getConfirmationMethods().add(method); final NameIdentifier nameIdentifier = newSamlObject(NameIdentifier.class); nameIdentifier.setNameIdentifier(identifier); final Subject subject = newSamlObject(Subject.class); subject.setNameIdentifier(nameIdentifier); subject.setSubjectConfirmation(confirmation); return subject; }
(SubjectConfirmation) buildXMLObject(SubjectConfirmation.DEFAULT_ELEMENT_NAME); ConfirmationMethod confMethod = (ConfirmationMethod) buildXMLObject(ConfirmationMethod.DEFAULT_ELEMENT_NAME); confMethod.setConfirmationMethod(CONF_KEY); subjectConf.getConfirmationMethods().add(confMethod); subject.setSubjectConfirmation(subjectConf);
(SubjectConfirmation) buildXMLObject(SubjectConfirmation.DEFAULT_ELEMENT_NAME); ConfirmationMethod confMethod = (ConfirmationMethod) buildXMLObject(ConfirmationMethod.DEFAULT_ELEMENT_NAME); confMethod.setConfirmationMethod(CONF_KEY); subjectConf.getConfirmationMethods().add(confMethod); subject.setSubjectConfirmation(subjectConf);
confirmationMethod.setConfirmationMethod(confirmationMethodStr); subjectConfirmation.getConfirmationMethods().add(confirmationMethod); if (subjectBean.getKeyInfo() != null) {
confirmationMethod.setConfirmationMethod(confirmationMethodStr); subjectConfirmation.getConfirmationMethods().add(confirmationMethod); if (subjectBean.getKeyInfo() != null) {