org.apache.ws.security.saml.ext.builder
Class SAML2ComponentBuilder

java.lang.Object
  extended by org.apache.ws.security.saml.ext.builder.SAML2ComponentBuilder

public class SAML2ComponentBuilder
extends Object

Class SAML2ComponentBuilder provides builder methods that can be used to construct SAML v2.0 statements using the OpenSaml library.

Created on May 18, 2009


Constructor Summary
SAML2ComponentBuilder()
           
 
Method Summary
static org.opensaml.saml2.core.Assertion createAssertion()
          Create a SAML 2 assertion
static org.opensaml.saml2.core.Attribute createAttribute(String friendlyName, String name)
          Deprecated.  
static org.opensaml.saml2.core.Attribute createAttribute(String friendlyName, String name, List<String> values)
          Deprecated.  
static org.opensaml.saml2.core.Attribute createAttribute(String friendlyName, String name, String nameFormat)
          Create an Attribute object.
static org.opensaml.saml2.core.Attribute createAttribute(String friendlyName, String name, String nameFormat, List<?> values)
          Create a SAML2 Attribute
static List<org.opensaml.saml2.core.AttributeStatement> createAttributeStatement(List<AttributeStatementBean> attributeData)
          Create SAML2 Attribute Statement(s)
static org.opensaml.saml2.core.AudienceRestriction createAudienceRestriction(String audienceURI)
          Create an AudienceRestriction object
static List<org.opensaml.saml2.core.AuthnStatement> createAuthnStatement(List<AuthenticationStatementBean> authBeans)
          Create SAML 2 Authentication Statement(s).
static List<org.opensaml.saml2.core.AuthzDecisionStatement> createAuthorizationDecisionStatement(List<AuthDecisionStatementBean> decisionData)
          Create SAML2 AuthorizationDecisionStatement(s)
static org.opensaml.saml2.core.Conditions createConditions(ConditionsBean conditionsBean)
          Create a Conditions object
static org.opensaml.saml2.core.Issuer createIssuer(String issuerValue)
          Create an Issuer object
static org.opensaml.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
static org.opensaml.saml2.core.Subject createSaml2Subject(SubjectBean subjectBean)
          Create a Subject.
static org.opensaml.saml2.core.Action createSamlAction(ActionBean actionBean)
          Create an Action object
static org.opensaml.saml2.core.SubjectConfirmation createSubjectConfirmation(String method, org.opensaml.saml2.core.SubjectConfirmationData subjectConfirmationData)
          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
static org.opensaml.saml2.core.SubjectConfirmationData createSubjectConfirmationData(String inResponseTo, String recipient, org.joda.time.DateTime notOnOrAfter, KeyInfoBean keyInfoBean)
          Create a SubjectConfirmationData object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAML2ComponentBuilder

public SAML2ComponentBuilder()
Method Detail

createAssertion

public static org.opensaml.saml2.core.Assertion createAssertion()
Create a SAML 2 assertion

Returns:
a SAML 2 assertion

createIssuer

public static org.opensaml.saml2.core.Issuer createIssuer(String issuerValue)
Create an Issuer object

Parameters:
issuerValue - of type String
Returns:
an Issuer object

createConditions

public static org.opensaml.saml2.core.Conditions createConditions(ConditionsBean conditionsBean)
Create a Conditions object

Parameters:
conditionsBean - A ConditionsBean object
Returns:
a Conditions object

createAudienceRestriction

public static org.opensaml.saml2.core.AudienceRestriction createAudienceRestriction(String audienceURI)
Create an AudienceRestriction object

Parameters:
audienceURI - of type String
Returns:
an AudienceRestriction object

createAuthnStatement

public static List<org.opensaml.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.saml2.core.Attribute createAttribute(String friendlyName,
                                                                String name,
                                                                List<String> values)
Deprecated. 

Create a SAML2 Attribute

Parameters:
friendlyName - of type String
name - of type String
values - of type ArrayList
Returns:
a SAML2 Attribute

createAttribute

public static org.opensaml.saml2.core.Attribute createAttribute(String friendlyName,
                                                                String name,
                                                                String nameFormat,
                                                                List<?> 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.saml2.core.Subject createSaml2Subject(SubjectBean subjectBean)
                                                          throws org.opensaml.xml.security.SecurityException,
                                                                 WSSecurityException
Create a Subject.

Parameters:
subjectBean - of type SubjectBean
Returns:
a Subject
Throws:
org.opensaml.xml.security.SecurityException
WSSecurityException

createSubjectConfirmationData

public static org.opensaml.saml2.core.SubjectConfirmationData createSubjectConfirmationData(String inResponseTo,
                                                                                            String recipient,
                                                                                            org.joda.time.DateTime notOnOrAfter,
                                                                                            KeyInfoBean keyInfoBean)
                                                                                     throws org.opensaml.xml.security.SecurityException,
                                                                                            WSSecurityException
Create a SubjectConfirmationData object

Parameters:
inResponseTo - of type String
recipient - of type String
notOnOrAfter - of type DateTime
keyInfoBean - of type KeyInfoBean
Returns:
a SubjectConfirmationData object
Throws:
org.opensaml.xml.security.SecurityException
WSSecurityException

createSubjectConfirmation

public static org.opensaml.saml2.core.SubjectConfirmation createSubjectConfirmation(String method,
                                                                                    org.opensaml.saml2.core.SubjectConfirmationData subjectConfirmationData)
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.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

createAttributeStatement

public static List<org.opensaml.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.saml2.core.Attribute createAttribute(String friendlyName,
                                                                String name)
Deprecated. 

Create an Attribute object. The name format is of type: urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified urn:oasis:names:tc:SAML:2.0:attrname-format:uri urn:oasis:names:tc:SAML:2.0:attrname-format:basic

Parameters:
friendlyName - of type String
name - of type String
Returns:
an Attribute object

createAttribute

public static org.opensaml.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.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.saml2.core.Action createSamlAction(ActionBean actionBean)
Create an Action object

Parameters:
actionBean - An ActionBean instance
Returns:
an Action object


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.