Class SAML2ComponentBuilder
java.lang.Object
org.apache.wss4j.common.saml.builder.SAML2ComponentBuilder
Class SAML2ComponentBuilder provides builder methods that can be used
to construct SAML v2.0 statements using the OpenSaml library.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.opensaml.saml.saml2.core.AdvicecreateAdvice(AdviceBean adviceBean) Create a Advice objectstatic org.opensaml.saml.saml2.core.AssertionCreate a SAML 2 assertionstatic org.opensaml.saml.saml2.core.AttributecreateAttribute(String friendlyName, String name, String nameFormat) Create an Attribute object.static org.opensaml.saml.saml2.core.AttributeCreate a SAML2 Attributestatic List<org.opensaml.saml.saml2.core.AttributeStatement>createAttributeStatement(List<AttributeStatementBean> attributeData) Create SAML2 Attribute Statement(s)static org.opensaml.saml.saml2.core.AudienceRestrictioncreateAudienceRestriction(AudienceRestrictionBean audienceRestrictionBean) Create an AudienceRestriction objectstatic List<org.opensaml.saml.saml2.core.AuthnStatement>createAuthnStatement(List<AuthenticationStatementBean> authBeans) Create SAML 2 Authentication Statement(s).static List<org.opensaml.saml.saml2.core.AuthzDecisionStatement>createAuthorizationDecisionStatement(List<AuthDecisionStatementBean> decisionData) Create SAML2 AuthorizationDecisionStatement(s)static org.opensaml.saml.saml2.core.ConditionscreateConditions(ConditionsBean conditionsBean) Create a Conditions objectstatic org.opensaml.saml.ext.saml2delrestrict.DelegationRestrictionTypecreateDelegationRestriction(List<DelegateBean> delegates) Create an DelegationRestrictionType objectstatic org.opensaml.saml.saml2.core.IssuercreateIssuer(String issuerValue, String issuerFormat, String issuerQualifier) Create an Issuer objectstatic org.opensaml.saml.saml2.core.NameIDcreateNameID(NameIDBean nameIDBean) static org.opensaml.saml.saml2.core.NameIDcreateNameID(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:transientstatic org.opensaml.saml.saml2.core.OneTimeUseCreate a OneTimeUse objectstatic org.opensaml.saml.saml2.core.ProxyRestrictioncreateProxyRestriction(ProxyRestrictionBean proxyRestrictionBean) Create a ProxyRestriction objectstatic org.opensaml.saml.saml2.core.SubjectcreateSaml2Subject(SubjectBean subjectBean) Create a Subject.static org.opensaml.saml.saml2.core.ActioncreateSamlAction(ActionBean actionBean) Create an Action objectstatic org.opensaml.saml.saml2.core.SubjectConfirmationcreateSubjectConfirmation(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:bearerstatic org.opensaml.saml.saml2.core.SubjectConfirmationDatacreateSubjectConfirmationData(SubjectConfirmationDataBean subjectConfirmationDataBean, KeyInfoBean keyInfoBean) Create a SubjectConfirmationData object
-
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 StringissuerFormat- of type StringissuerQualifier- 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 Stringname- of type StringnameFormat- of type Stringvalues- 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.SecurityExceptionWSSecurityException
-
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 SubjectConfirmationDataBeankeyInfoBean- of type KeyInfoBean- Returns:
- a SubjectConfirmationData object
- Throws:
org.opensaml.security.SecurityExceptionWSSecurityException
-
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 StringsubjectConfirmationData- of type SubjectConfirmationData- Returns:
- a SubjectConfirmation object
-
createNameID
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
-
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 Stringname- of type StringnameFormat- 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
Create an Action object- Parameters:
actionBean- An ActionBean instance- Returns:
- an Action object
-