/** {@inheritDoc} */ protected void processElementContent(XMLObject samlObject, String elementContent) { NameIdentifier nameIdentifier = (NameIdentifier) samlObject; nameIdentifier.setValue(elementContent); } }
/** {@inheritDoc} */ protected void processElementContent(XMLObject samlObject, String elementContent) { Audience audience = (Audience) samlObject; audience.setUri(elementContent); } }
/** {@inheritDoc} */ protected void processElementContent(XMLObject samlObject, String elementContent) { ConfirmationMethod confirmationMethod = (ConfirmationMethod) samlObject; confirmationMethod.setConfirmationMethod(elementContent); } }
/** * New subject element with given confirmation method. * * @param identifier the identifier * @param confirmationMethod the confirmation method * @return the subject */ public Subject newSubject(final String identifier, final String confirmationMethod) { final SubjectConfirmation confirmation = newSamlObject(SubjectConfirmation.class); final ConfirmationMethod method = newSamlObject(ConfirmationMethod.class); method.setConfirmationMethod(confirmationMethod); 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; }
private static org.opensaml.saml.saml1.core.Subject getSaml1Subject(SamlAssertionWrapper assertionW) { for (Statement stmt : assertionW.getSaml1().getStatements()) { org.opensaml.saml.saml1.core.Subject samlSubject = null; if (stmt instanceof AttributeStatement) { AttributeStatement attrStmt = (AttributeStatement) stmt; samlSubject = attrStmt.getSubject(); } else if (stmt instanceof AuthenticationStatement) { AuthenticationStatement authStmt = (AuthenticationStatement) stmt; samlSubject = authStmt.getSubject(); } else { AuthorizationDecisionStatement authzStmt = (AuthorizationDecisionStatement)stmt; samlSubject = authzStmt.getSubject(); } if (samlSubject != null) { return samlSubject; } } return null; }
/** * Create a new SAML status object. * * @param codeValue the code value * @param statusMessage the status message * @return the status */ public Status newStatus(final QName codeValue, final String statusMessage) { final Status status = newSamlObject(Status.class); final StatusCode code = newSamlObject(StatusCode.class); code.setValue(codeValue); status.setStatusCode(code); if (statusMessage != null) { final StatusMessage message = newSamlObject(StatusMessage.class); message.setMessage(statusMessage); status.setStatusMessage(message); } return status; }
public String apply(final org.opensaml.saml.saml1.core.Assertion input) { return input.getID(); } });
public DateTime apply(final org.opensaml.saml.saml1.core.Assertion input) { return input.getIssueInstant(); } });
/** {@inheritDoc} */ protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { NameIdentifier nameIdentifier = (NameIdentifier) samlObject; if (nameIdentifier.getValue() != null) { ElementSupport.appendTextContent(domElement, nameIdentifier.getValue()); } } }
/** {@inheritDoc} */ protected void processElementContent(XMLObject samlObject, String elementContent) { StatusMessage statusMessage = (StatusMessage) samlObject; statusMessage.setMessage(elementContent); } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException { AuthorizationDecisionStatement authorizationDecisionStatement; authorizationDecisionStatement = (AuthorizationDecisionStatement) samlElement; if (authorizationDecisionStatement.getResource() != null) { domElement.setAttributeNS(null, AuthorizationDecisionStatement.RESOURCE_ATTRIB_NAME, authorizationDecisionStatement.getResource()); } if (authorizationDecisionStatement.getDecision() != null) { domElement.setAttributeNS(null, AuthorizationDecisionStatement.DECISION_ATTRIB_NAME, authorizationDecisionStatement.getDecision().toString()); } } }
/** {@inheritDoc} */ protected void processElementContent(XMLObject samlObject, String elementContent) { Action action = (Action) samlObject; action.setContents(elementContent); } }
/** {@inheritDoc} */ protected void processElementContent(XMLObject samlObject, String elementContent) { AssertionIDReference assertionIDReference = (AssertionIDReference) samlObject; assertionIDReference.setReference(elementContent); } }
/** {@inheritDoc} */ protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { StatusMessage statusMessage = (StatusMessage) samlObject; if (statusMessage.getMessage() != null) { ElementSupport.appendTextContent(domElement, statusMessage.getMessage()); } } }
/** {@inheritDoc} */ protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { ConfirmationMethod confirmationMethod = (ConfirmationMethod) samlObject; ElementSupport.appendTextContent(domElement, confirmationMethod.getConfirmationMethod()); } }
/** {@inheritDoc} */ protected void processElementContent(XMLObject samlObject, String elementContent) { AssertionArtifact assertionArtifact = (AssertionArtifact) samlObject; assertionArtifact.setAssertionArtifact(elementContent); } }
/** {@inheritDoc} */ protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { Action action = (Action) samlObject; if (action.getContents() != null) { ElementSupport.appendTextContent(domElement, action.getContents()); } } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { ResponseAbstractType response = (ResponseAbstractType) parentSAMLObject; if (childSAMLObject instanceof Signature) { response.setSignature((Signature) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { SubjectStatement statement = (SubjectStatement) parentSAMLObject; if (childSAMLObject instanceof Subject) { statement.setSubject((Subject) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }
private static org.opensaml.saml.saml1.core.Subject getSaml1Subject(SamlAssertionWrapper assertionW) { for (Statement stmt : assertionW.getSaml1().getStatements()) { org.opensaml.saml.saml1.core.Subject samlSubject = null; if (stmt instanceof AttributeStatement) { AttributeStatement attrStmt = (AttributeStatement) stmt; samlSubject = attrStmt.getSubject(); } else if (stmt instanceof AuthenticationStatement) { AuthenticationStatement authStmt = (AuthenticationStatement) stmt; samlSubject = authStmt.getSubject(); } else { AuthorizationDecisionStatement authzStmt = (AuthorizationDecisionStatement)stmt; samlSubject = authzStmt.getSubject(); } if (samlSubject != null) { return samlSubject; } } return null; }