Class SAML2ComponentBuilder

java.lang.Object
org.apache.wss4j.common.saml.builder.SAML2ComponentBuilder

public final class SAML2ComponentBuilder extends Object
Class SAML2ComponentBuilder provides builder methods that can be used to construct SAML v2.0 statements using the OpenSaml library.
  • Method Details

    • createAssertion

      public static org.opensaml.saml.saml2.core.Assertion createAssertion()
      Create a SAML 2 assertion
      Returns:
      a SAML 2 assertion
    • createIssuer

      public static org.opensaml.saml.saml2.core.Issuer createIssuer(String issuerValue, String issuerFormat, String issuerQualifier)
      Create an Issuer object
      Parameters:
      issuerValue - of type String
      issuerFormat - of type String
      issuerQualifier - of type String
      Returns:
      an Issuer object
    • createConditions

      public static org.opensaml.saml.saml2.core.Conditions createConditions(ConditionsBean conditionsBean)
      Create a Conditions object
      Parameters:
      conditionsBean - A ConditionsBean object
      Returns:
      a Conditions object
    • createAdvice

      public static org.opensaml.saml.saml2.core.Advice createAdvice(AdviceBean adviceBean) throws WSSecurityException
      Create a Advice object
      Parameters:
      adviceBean - A AdviceBean object
      Returns:
      a Advice object
      Throws:
      WSSecurityException
    • createAudienceRestriction

      public static org.opensaml.saml.saml2.core.AudienceRestriction createAudienceRestriction(AudienceRestrictionBean audienceRestrictionBean)
      Create an AudienceRestriction object
      Parameters:
      audienceRestrictionBean - of type AudienceRestrictionBean
      Returns:
      an AudienceRestriction object
    • createDelegationRestriction

      public static org.opensaml.saml.ext.saml2delrestrict.DelegationRestrictionType createDelegationRestriction(List<DelegateBean> delegates)
      Create an DelegationRestrictionType object
      Parameters:
      delegates - of type List
      Returns:
      a DelegationRestrictionType object
    • createOneTimeUse

      public static org.opensaml.saml.saml2.core.OneTimeUse createOneTimeUse()
      Create a OneTimeUse object
      Returns:
      a OneTimeUse object
    • createProxyRestriction

      public static org.opensaml.saml.saml2.core.ProxyRestriction createProxyRestriction(ProxyRestrictionBean proxyRestrictionBean)
      Create a ProxyRestriction object
      Returns:
      a ProxyRestriction object
    • createAuthnStatement

      public static List<org.opensaml.saml.saml2.core.AuthnStatement> createAuthnStatement(List<AuthenticationStatementBean> authBeans)
      Create SAML 2 Authentication Statement(s).
      Parameters:
      authBeans - A list of AuthenticationStatementBean instances
      Returns:
      SAML 2 Authentication Statement(s).
    • createAttribute

      public static org.opensaml.saml.saml2.core.Attribute createAttribute(String friendlyName, String name, String nameFormat, List<Object> values)
      Create a SAML2 Attribute
      Parameters:
      friendlyName - of type String
      name - of type String
      nameFormat - of type String
      values - of type ArrayList
      Returns:
      a SAML2 Attribute
    • createSaml2Subject

      public static org.opensaml.saml.saml2.core.Subject createSaml2Subject(SubjectBean subjectBean) throws org.opensaml.security.SecurityException, WSSecurityException
      Create a Subject.
      Parameters:
      subjectBean - of type SubjectBean
      Returns:
      a Subject
      Throws:
      org.opensaml.security.SecurityException
      WSSecurityException
    • createSubjectConfirmationData

      public static org.opensaml.saml.saml2.core.SubjectConfirmationData createSubjectConfirmationData(SubjectConfirmationDataBean subjectConfirmationDataBean, KeyInfoBean keyInfoBean) throws org.opensaml.security.SecurityException, WSSecurityException
      Create a SubjectConfirmationData object
      Parameters:
      subjectConfirmationDataBean - of type SubjectConfirmationDataBean
      keyInfoBean - of type KeyInfoBean
      Returns:
      a SubjectConfirmationData object
      Throws:
      org.opensaml.security.SecurityException
      WSSecurityException
    • createSubjectConfirmation

      public static org.opensaml.saml.saml2.core.SubjectConfirmation createSubjectConfirmation(String method, org.opensaml.saml.saml2.core.SubjectConfirmationData subjectConfirmationData, org.opensaml.saml.saml2.core.NameID subjectConfirmationNameId)
      Create a SubjectConfirmation object One of the following subject confirmation methods MUST be used: urn:oasis:names:tc:SAML:2.0:cm:holder-of-key urn:oasis:names:tc:SAML:2.0:cm:sender-vouches urn:oasis:names:tc:SAML:2.0:cm:bearer
      Parameters:
      method - of type String
      subjectConfirmationData - of type SubjectConfirmationData
      Returns:
      a SubjectConfirmation object
    • createNameID

      public static org.opensaml.saml.saml2.core.NameID createNameID(SubjectBean subject)
      Create a NameID object One of the following formats MUST be used: urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos urn:oasis:names:tc:SAML:2.0:nameid-format:entity urn:oasis:names:tc:SAML:2.0:nameid-format:persistent urn:oasis:names:tc:SAML:2.0:nameid-format:transient
      Parameters:
      subject - A SubjectBean instance
      Returns:
      NameID
    • createNameID

      public static org.opensaml.saml.saml2.core.NameID createNameID(NameIDBean nameIDBean)
    • createAttributeStatement

      public static List<org.opensaml.saml.saml2.core.AttributeStatement> createAttributeStatement(List<AttributeStatementBean> attributeData)
      Create SAML2 Attribute Statement(s)
      Parameters:
      attributeData - A list of AttributeStatementBean instances
      Returns:
      SAML2 Attribute Statement(s)
    • createAttribute

      public static org.opensaml.saml.saml2.core.Attribute createAttribute(String friendlyName, String name, String nameFormat)
      Create an Attribute object.
      Parameters:
      friendlyName - of type String
      name - of type String
      nameFormat - of type String
      Returns:
      an Attribute object
    • createAuthorizationDecisionStatement

      public static List<org.opensaml.saml.saml2.core.AuthzDecisionStatement> createAuthorizationDecisionStatement(List<AuthDecisionStatementBean> decisionData)
      Create SAML2 AuthorizationDecisionStatement(s)
      Parameters:
      decisionData - A list of AuthDecisionStatementBean instances
      Returns:
      SAML2 AuthorizationDecisionStatement(s)
    • createSamlAction

      public static org.opensaml.saml.saml2.core.Action createSamlAction(ActionBean actionBean)
      Create an Action object
      Parameters:
      actionBean - An ActionBean instance
      Returns:
      an Action object