com.sun.xml.wss.saml.impl
Class SAMLAssertion1_1FactoryImpl

java.lang.Object
  extended by com.sun.xml.wss.saml.SAMLAssertionFactory
      extended by com.sun.xml.wss.saml.impl.SAMLAssertion1_1FactoryImpl

public class SAMLAssertion1_1FactoryImpl
extends SAMLAssertionFactory

Author:
root

Field Summary
 
Fields inherited from class com.sun.xml.wss.saml.SAMLAssertionFactory
SAML_VER_CHECK, SAML1_1, SAML2_0
 
Constructor Summary
SAMLAssertion1_1FactoryImpl()
          Creates a new instance of SAMLAssertion1_1FactoryImpl
 
Method Summary
 Action createAction(Element actionElement)
           
 Action createAction(String action, String namespace)
          Creates an Action element.
 Advice createAdvice(List assertionidreference, List assertion, List otherelement)
          Creates an Advice element.
 AnyType createAnyType()
          Creates an AnyType element if the System property "com.sun.xml.wss.saml.binding.jaxb" is set.
 Assertion createAssertion(Element element)
          Creates and returns an Assertion object from the given SAML org.w3c.dom.Element.
 Assertion createAssertion(String ID, NameID issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, Subject subject, List statements)
          Creates and return an Assertion from the data members: the ID, the issuer, time when assertion issued, the conditions when creating a new assertion , Advice applicable to this Assertion, Subjectand a set of Statement(s) in the assertion.
 Assertion createAssertion(String ID, NameID issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, Subject subject, List statements, JAXBContext jcc)
          Creates and return an Assertion from the data members: the ID, the issuer, time when assertion issued, the conditions when creating a new assertion , Advice applicable to this Assertion, Subject, a set of Statement(s) ,and a jaxbcontext for the assertion.
 Assertion createAssertion(String assertionID, String issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, List statements)
          Creates and return an Assertion from the data members: the assertionID, the issuer, time when assertion issued, the conditions when creating a new assertion , Advice applicable to this Assertion and a set of Statement(s) in the assertion.
 Assertion createAssertion(String assertionID, String issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, List statements, JAXBContext jcc)
           
 Assertion createAssertion(XMLStreamReader reader)
          Creates and returns an Assertion object from the given SAML XMLStreamReader.
 AssertionIDRef createAssertionIDRef()
          Creates and returns an AssertionIDRef object.
 AssertionIDRef createAssertionIDRef(String id)
          Creates and returns an AssertionIDRef object.
 AssertionIDReference createAssertionIDReference()
          Creates and returns an AssertionIDReference object.
 AssertionIDReference createAssertionIDReference(String id)
          Creates and returns an AssertionIDReference object.
 Attribute createAttribute(String name, List values)
          Constructs an instance of Attribute.
 Attribute createAttribute(String name, String nameSpace, List values)
          Constructs an instance of Attribute.
 AttributeDesignator createAttributeDesignator(String name, String nameSpace)
          Constructs an instance of AttributeDesignator.
 AttributeStatement createAttributeStatement(List attr)
          Constructs an instance of AttributeStatement.
 AttributeStatement createAttributeStatement(Subject subj, List attr)
          Constructs an instance of AttributeStatement.
 AudienceRestriction createAudienceRestriction(List audience)
          Constructs an instance of AudienceRestriction.
 AudienceRestrictionCondition createAudienceRestrictionCondition(List audience)
          Constructs an instance of AudienceRestrictionCondition.
 AuthenticationStatement createAuthenticationStatement(String authMethod, GregorianCalendar authInstant, Subject subject, SubjectLocality subjectLocality, List authorityBinding)
          Constructs an instance of AuthenticationStatement.
 AuthnContext createAuthnContext()
           
 AuthnContext createAuthnContext(String authContextClassref, String authenticatingAuthority)
           
 AuthnDecisionStatement createAuthnDecisionStatement(String resource, String decision, List action, Evidence evidence)
          Constructs an instance of AuthnDecisionStatement.
 AuthnStatement createAuthnStatement(GregorianCalendar authInstant, SubjectLocality subjectLocality, AuthnContext authnContext, String sessionIndex, GregorianCalendar sessionNotOnOrAfter)
          Constructs an instance of AuthenticationStatement.
 AuthorityBinding createAuthorityBinding(QName authKind, String location, String binding)
          Constructs an instance of AuthorityBinding.
 AuthorizationDecisionStatement createAuthorizationDecisionStatement(Subject subject, String resource, String decision, List action, Evidence evidence)
          Constructs an instance of AuthorizationDecisionStatement.
 Conditions createConditions()
          Constructs an instance of default Conditions object.
 Conditions createConditions(GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, List condition, List arc, List doNotCacheCnd)
          Constructs an instance of Conditions.
 Conditions createConditions(GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, List condition, List ar, List oneTimeUse, List proxyRestriction)
          Constructs an instance of Conditions.
 DoNotCacheCondition createDoNotCacheCondition()
          Constructs an instance of DoNotCacheCondition
 Evidence createEvidence(List assertionIDRef, List assertion)
          Constructs an Evidence from a List of Assertion and AssertionIDReference objects.
 KeyInfoConfirmationData createKeyInfoConfirmationData(Element keyInfo)
           
 NameID createNameID(String name, String nameQualifier, String format)
          Constructs a NameID instance.
 NameIdentifier createNameIdentifier(String name, String nameQualifier, String format)
          Constructs a NameQualifier instance.
 OneTimeUse createOneTimeUse()
           
 Subject createSubject(NameIdentifier nameIdentifier, SubjectConfirmation subjectConfirmation)
          Constructs a Subject object from a NameIdentifier object and a SubjectConfirmation object.
 Subject createSubject(NameID nameID, SubjectConfirmation subjectConfirmation)
          Constructs a Subject object from a NameID object and a SubjectConfirmation object.
 SubjectConfirmation createSubjectConfirmation(List confirmationMethods, Element subjectConfirmationData, Element keyInfo)
          Constructs a SubjectConfirmation instance.
 SubjectConfirmation createSubjectConfirmation(List confirmationMethods, SubjectConfirmationData scd, KeyInfo keyInfo)
           
 SubjectConfirmation createSubjectConfirmation(NameID nameID, KeyInfoConfirmationData subjectConfirmationData, String confirmationMethod)
          Constructs a SubjectConfirmation instance.
 SubjectConfirmation createSubjectConfirmation(NameID nameID, String method)
          Creates and returns a SubjectConfirmation object.
 SubjectConfirmation createSubjectConfirmation(NameID nameID, SubjectConfirmationData subjectConfirmationData, String confirmationMethod)
          Constructs a SubjectConfirmation instance.
 SubjectConfirmation createSubjectConfirmation(String confirmationMethod)
          Creates and returns a SubjectConfirmation object.
 SubjectConfirmationData createSubjectConfirmationData(String address, String inResponseTo, GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, String recipient, Element keyInfo)
           
 SubjectConfirmationData createSubjectConfirmationData(String address, String inResponseTo, GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, String recipient, KeyInfo keyInfo)
           
 SubjectLocality createSubjectLocality()
          Constructs a SubjectLocality instance.
 SubjectLocality createSubjectLocality(String ipAddress, String dnsAddress)
          Constructs an instance of SubjectLocality.
 
Methods inherited from class com.sun.xml.wss.saml.SAMLAssertionFactory
newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAMLAssertion1_1FactoryImpl

public SAMLAssertion1_1FactoryImpl()
Creates a new instance of SAMLAssertion1_1FactoryImpl

Method Detail

createAction

public Action createAction(Element actionElement)
                    throws SAMLException
Throws:
SAMLException

createAction

public Action createAction(String action,
                           String namespace)
                    throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates an Action element.

Specified by:
createAction in class SAMLAssertionFactory
Parameters:
action - A String representing an action
namespace - The attribute "namespace" of Action element
Throws:
SAMLException

createAdvice

public Advice createAdvice(List assertionidreference,
                           List assertion,
                           List otherelement)
                    throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates an Advice element.

Specified by:
createAdvice in class SAMLAssertionFactory
Parameters:
assertionidreference - A List of AssertionIDReference.
assertion - A List of Assertion
otherelement - A List of any element defined as
Throws:
SAMLException

createAnyType

public AnyType createAnyType()
                      throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates an AnyType element if the System property "com.sun.xml.wss.saml.binding.jaxb" is set. Otherwise returns null.

Specified by:
createAnyType in class SAMLAssertionFactory
Throws:
SAMLException

createAssertion

public Assertion createAssertion(Element element)
                          throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and returns an Assertion object from the given SAML org.w3c.dom.Element.

Specified by:
createAssertion in class SAMLAssertionFactory
Parameters:
element - A org.w3c.dom.Element representing DOM tree for Assertion object
Throws:
SAMLException - if it could not process the Element properly, implying that there is an error in the sender or in the element definition.

createAssertion

public Assertion createAssertion(String assertionID,
                                 String issuer,
                                 GregorianCalendar issueInstant,
                                 Conditions conditions,
                                 Advice advice,
                                 List statements)
                          throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and return an Assertion from the data members: the assertionID, the issuer, time when assertion issued, the conditions when creating a new assertion , Advice applicable to this Assertion and a set of Statement(s) in the assertion.

Specified by:
createAssertion in class SAMLAssertionFactory
Parameters:
assertionID - AssertionID object contained within this Assertion if null its generated internally.
issuer - The issuer of this assertion.
issueInstant - Time instant of the issue. It has type dateTime which is built in to the W3C XML Schema Types specification. if null, current time is used.
conditions - Conditions under which the this Assertion is valid.
advice - Advice applicable for this Assertion.
statements - List of Statement objects within this Assertion. It could be of type AuthenticationStatement, AuthorizationDecisionStatement and AttributeStatement. Each Assertion can have multiple type of statements in it.
Throws:
SAMLException - if there is an error in processing input.

createAssertion

public Assertion createAssertion(String assertionID,
                                 String issuer,
                                 GregorianCalendar issueInstant,
                                 Conditions conditions,
                                 Advice advice,
                                 List statements,
                                 JAXBContext jcc)
                          throws SAMLException
Specified by:
createAssertion in class SAMLAssertionFactory
Throws:
SAMLException

createAssertion

public Assertion createAssertion(String ID,
                                 NameID issuer,
                                 GregorianCalendar issueInstant,
                                 Conditions conditions,
                                 Advice advice,
                                 Subject subject,
                                 List statements)
                          throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and return an Assertion from the data members: the ID, the issuer, time when assertion issued, the conditions when creating a new assertion , Advice applicable to this Assertion, Subjectand a set of Statement(s) in the assertion.

Specified by:
createAssertion in class SAMLAssertionFactory
Parameters:
ID - ID object contained within this Assertion if null its generated internally.
issuer - The issuer of this assertion.
issueInstant - Time instant of the issue. It has type dateTime which is built in to the W3C XML Schema Types specification. if null, current time is used.
conditions - Conditions under which the this Assertion is valid.
advice - Advice applicable for this Assertion.
subject - Subject applicable for this Assertion
statements - List of Statement objects within this Assertion. It could be of type AuthnStatement, AuthzDecisionStatement and AttributeStatement. Each Assertion can have multiple type of statements in it.
Throws:
SAMLException - if there is an error in processing input.

createAssertion

public Assertion createAssertion(String ID,
                                 NameID issuer,
                                 GregorianCalendar issueInstant,
                                 Conditions conditions,
                                 Advice advice,
                                 Subject subject,
                                 List statements,
                                 JAXBContext jcc)
                          throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and return an Assertion from the data members: the ID, the issuer, time when assertion issued, the conditions when creating a new assertion , Advice applicable to this Assertion, Subject, a set of Statement(s) ,and a jaxbcontext for the assertion.

Specified by:
createAssertion in class SAMLAssertionFactory
Parameters:
ID - ID object contained within this Assertion if null its generated internally.
issuer - The issuer of this assertion.
issueInstant - Time instant of the issue. It has type dateTime which is built in to the W3C XML Schema Types specification. if null, current time is used.
conditions - Conditions under which the this Assertion is valid.
advice - Advice applicable for this Assertion.
subject - Subject applicable for this Assertion
statements - List of Statement objects within this Assertion. It could be of type AuthnStatement, AuthzDecisionStatement and AttributeStatement. Each Assertion can have multiple type of statements in it.
jcc - JAXBContext to be used for marshaling and unmarshalling the assertions.
Throws:
SAMLException - if there is an error in processing input.

createAssertionIDReference

public AssertionIDReference createAssertionIDReference()
                                                throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and returns an AssertionIDReference object. AssertionID will be generated automatically.

Specified by:
createAssertionIDReference in class SAMLAssertionFactory
Returns:
null if the system property "com.sun.xml.wss.saml.binding.jaxb" is not set otherwise returns AssertionIDReference.
Throws:
SAMLException

createAssertionIDRef

public AssertionIDRef createAssertionIDRef()
                                    throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and returns an AssertionIDRef object. AssertionID will be generated automatically.

Specified by:
createAssertionIDRef in class SAMLAssertionFactory
Returns:
null if the system property "com.sun.xml.wss.saml.binding.jaxb" is not set otherwise returns AssertionIDReference.
Throws:
SAMLException

createAssertionIDReference

public AssertionIDReference createAssertionIDReference(String id)
                                                throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and returns an AssertionIDReference object.

Specified by:
createAssertionIDReference in class SAMLAssertionFactory
Parameters:
id - String of an AssertionID
Returns:
null if the system property "com.sun.xml.wss.saml.binding.jaxb" is not set otherwise returns AssertionIDReference.
Throws:
SAMLException

createAssertionIDRef

public AssertionIDRef createAssertionIDRef(String id)
                                    throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and returns an AssertionIDRef object.

Specified by:
createAssertionIDRef in class SAMLAssertionFactory
Parameters:
id - String of an AssertionID
Returns:
null if the system property "com.sun.xml.wss.saml.binding.jaxb" is not set otherwise returns AssertionIDReference.
Throws:
SAMLException

createAttribute

public Attribute createAttribute(String name,
                                 String nameSpace,
                                 List values)
                          throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of Attribute.

Specified by:
createAttribute in class SAMLAssertionFactory
Parameters:
name - A String representing AttributeName (the name of the attribute).
nameSpace - A String representing the namespace in which AttributeName elements are interpreted.
values - A List representing the AttributeValue object.
Throws:
SAMLException

createAttribute

public Attribute createAttribute(String name,
                                 List values)
                          throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of Attribute.

Specified by:
createAttribute in class SAMLAssertionFactory
Parameters:
name - A String representing AttributeName (the name of the attribute).
values - A List representing the AttributeValue object.
Throws:
SAMLException

createAttributeDesignator

public AttributeDesignator createAttributeDesignator(String name,
                                                     String nameSpace)
                                              throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of AttributeDesignator.

Specified by:
createAttributeDesignator in class SAMLAssertionFactory
Parameters:
name - the name of the attribute.
nameSpace - the namespace in which AttributeName elements are interpreted.
Throws:
SAMLException

createAttributeStatement

public AttributeStatement createAttributeStatement(Subject subj,
                                                   List attr)
                                            throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of AttributeStatement.

Specified by:
createAttributeStatement in class SAMLAssertionFactory
Parameters:
subj - SAML Subject
attr - List of attributes
Throws:
SAMLException

createAttributeStatement

public AttributeStatement createAttributeStatement(List attr)
                                            throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of AttributeStatement.

Specified by:
createAttributeStatement in class SAMLAssertionFactory
Parameters:
attr - List of attributes
Throws:
SAMLException

createAudienceRestrictionCondition

public AudienceRestrictionCondition createAudienceRestrictionCondition(List audience)
                                                                throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of AudienceRestrictionCondition. It takes in a List of audience for this condition, each of them being a String.

Specified by:
createAudienceRestrictionCondition in class SAMLAssertionFactory
Parameters:
audience - A List of audience to be included within this condition
Throws:
SAMLException

createAudienceRestriction

public AudienceRestriction createAudienceRestriction(List audience)
                                              throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of AudienceRestriction. It takes in a List of audience for this condition, each of them being a String.

Specified by:
createAudienceRestriction in class SAMLAssertionFactory
Parameters:
audience - A List of audience to be included within this condition
Throws:
SAMLException

createAuthenticationStatement

public AuthenticationStatement createAuthenticationStatement(String authMethod,
                                                             GregorianCalendar authInstant,
                                                             Subject subject,
                                                             SubjectLocality subjectLocality,
                                                             List authorityBinding)
                                                      throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of AuthenticationStatement.

Specified by:
createAuthenticationStatement in class SAMLAssertionFactory
Parameters:
authMethod - (optional) A String specifies the type of authentication that took place. Pass null if not required.
authInstant - (optional) A GregorianCalendar object specifing the time at which the authentication that took place. Pass null if not required.
subject - (required) A Subject object
subjectLocality - (optional) A SubjectLocality object. Pass null if not required.
authorityBinding - (optional) A List of AuthorityBinding. Pass null if not required. objects.
Throws:
SAMLException

createAuthnStatement

public AuthnStatement createAuthnStatement(GregorianCalendar authInstant,
                                           SubjectLocality subjectLocality,
                                           AuthnContext authnContext,
                                           String sessionIndex,
                                           GregorianCalendar sessionNotOnOrAfter)
                                    throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of AuthenticationStatement.

Specified by:
createAuthnStatement in class SAMLAssertionFactory
Parameters:
authInstant - (optional) A GregorianCalendar object specifing the time at which the authentication that took place. Pass null if not required.
subjectLocality - (optional) A SubjectLocality object. Pass null if not required.
authnContext - (optional) A AuthnContext object. Pass null if not required. objects.
Throws:
SAMLException

createAuthorityBinding

public AuthorityBinding createAuthorityBinding(QName authKind,
                                               String location,
                                               String binding)
                                        throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of AuthorityBinding.

Specified by:
createAuthorityBinding in class SAMLAssertionFactory
Parameters:
authKind - A QName representing the type of SAML protocol queries to which the authority described by this element will respond.
location - A String representing a URI reference describing how to locate and communicate with the authority.
binding - A String representing a URI reference identifying the SAML protocol binding to use in communicating with the authority.
Throws:
SAMLException

createAuthnContext

public AuthnContext createAuthnContext()
                                throws SAMLException
Specified by:
createAuthnContext in class SAMLAssertionFactory
Throws:
SAMLException

createAuthnContext

public AuthnContext createAuthnContext(String authContextClassref,
                                       String authenticatingAuthority)
                                throws SAMLException
Specified by:
createAuthnContext in class SAMLAssertionFactory
Throws:
SAMLException

createAuthorizationDecisionStatement

public AuthorizationDecisionStatement createAuthorizationDecisionStatement(Subject subject,
                                                                           String resource,
                                                                           String decision,
                                                                           List action,
                                                                           Evidence evidence)
                                                                    throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of AuthorizationDecisionStatement.

Specified by:
createAuthorizationDecisionStatement in class SAMLAssertionFactory
Parameters:
subject - (required) A Subject object
resource - (required) A String identifying the resource to which access authorization is sought.
decision - (required) The decision rendered by the issuer with respect to the specified resource.
action - (required) A List of Action objects specifying the set of actions authorized to be performed on the specified resource.
evidence - (optional) An Evidence object representing a set of assertions that the issuer replied on in making decisions.
Throws:
SAMLException

createAuthnDecisionStatement

public AuthnDecisionStatement createAuthnDecisionStatement(String resource,
                                                           String decision,
                                                           List action,
                                                           Evidence evidence)
                                                    throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of AuthnDecisionStatement.

Specified by:
createAuthnDecisionStatement in class SAMLAssertionFactory
Parameters:
resource - (required) A String identifying the resource to which access authorization is sought.
decision - (required) The decision rendered by the issuer with respect to the specified resource.
action - (required) A List of Action objects specifying the set of actions authorized to be performed on the specified resource.
evidence - (optional) An Evidence object representing a set of assertions that the issuer replied on in making decisions.
Throws:
SAMLException

createConditions

public Conditions createConditions()
                            throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of default Conditions object.

Specified by:
createConditions in class SAMLAssertionFactory
Throws:
SAMLException

createConditions

public Conditions createConditions(GregorianCalendar notBefore,
                                   GregorianCalendar notOnOrAfter,
                                   List condition,
                                   List arc,
                                   List doNotCacheCnd)
                            throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of Conditions.

Specified by:
createConditions in class SAMLAssertionFactory
Parameters:
notBefore - specifies the earliest time instant at which the assertion is valid.
notOnOrAfter - specifies the time instant at which the assertion has expired.
arc - the AudienceRestrictionCondition to be added. Can be null, if no audience restriction.
Throws:
SAMLException

createConditions

public Conditions createConditions(GregorianCalendar notBefore,
                                   GregorianCalendar notOnOrAfter,
                                   List condition,
                                   List ar,
                                   List oneTimeUse,
                                   List proxyRestriction)
                            throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of Conditions.

Specified by:
createConditions in class SAMLAssertionFactory
Parameters:
notBefore - specifies the earliest time instant at which the assertion is valid.
notOnOrAfter - specifies the time instant at which the assertion has expired.
ar - the AudienceRestriction to be added. Can be null, if no audience restriction.
Throws:
SAMLException

createDoNotCacheCondition

public DoNotCacheCondition createDoNotCacheCondition()
                                              throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of DoNotCacheCondition

Specified by:
createDoNotCacheCondition in class SAMLAssertionFactory
Throws:
SAMLException

createOneTimeUse

public OneTimeUse createOneTimeUse()
                            throws SAMLException
Specified by:
createOneTimeUse in class SAMLAssertionFactory
Throws:
SAMLException

createEvidence

public Evidence createEvidence(List assertionIDRef,
                               List assertion)
                        throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an Evidence from a List of Assertion and AssertionIDReference objects.

Specified by:
createEvidence in class SAMLAssertionFactory
Parameters:
assertionIDRef - List of AssertionIDReference objects.
assertion - List of Assertion objects.
Throws:
SAMLException

createNameIdentifier

public NameIdentifier createNameIdentifier(String name,
                                           String nameQualifier,
                                           String format)
                                    throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs a NameQualifier instance.

Specified by:
createNameIdentifier in class SAMLAssertionFactory
Parameters:
name - The string representing the name of the Subject
nameQualifier - The security or administrative domain that qualifies the name of the Subject. This is optional could be null.
format - The syntax used to describe the name of the Subject. This optional, could be null.
Throws:
SAMLException

createNameID

public NameID createNameID(String name,
                           String nameQualifier,
                           String format)
                    throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs a NameID instance.

Specified by:
createNameID in class SAMLAssertionFactory
Parameters:
name - The string representing the name of the Subject
nameQualifier - The security or administrative domain that qualifies the name of the Subject. This is optional could be null.
format - The syntax used to describe the name of the Subject. This optional, could be null.
Throws:
SAMLException

createSubject

public Subject createSubject(NameIdentifier nameIdentifier,
                             SubjectConfirmation subjectConfirmation)
                      throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs a Subject object from a NameIdentifier object and a SubjectConfirmation object.

Specified by:
createSubject in class SAMLAssertionFactory
Parameters:
nameIdentifier - NameIdentifier object.
subjectConfirmation - SubjectConfirmation object.
Throws:
SAMLException

createSubject

public Subject createSubject(NameID nameID,
                             SubjectConfirmation subjectConfirmation)
                      throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs a Subject object from a NameID object and a SubjectConfirmation object.

Specified by:
createSubject in class SAMLAssertionFactory
Parameters:
nameID - NameID object.
subjectConfirmation - SubjectConfirmation object.
Throws:
SAMLException

createSubjectConfirmation

public SubjectConfirmation createSubjectConfirmation(String confirmationMethod)
                                              throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and returns a SubjectConfirmation object.

Specified by:
createSubjectConfirmation in class SAMLAssertionFactory
Parameters:
confirmationMethod - A URI (String) that identifies a protocol used to authenticate a Subject. Please refer to draft-sstc-core-25 Section 7 for a list of URIs identifying common authentication protocols.
Throws:
SAMLException

createSubjectConfirmation

public SubjectConfirmation createSubjectConfirmation(NameID nameID,
                                                     String method)
                                              throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and returns a SubjectConfirmation object.

Specified by:
createSubjectConfirmation in class SAMLAssertionFactory
Parameters:
nameID - NameID object.
method - A URI (String) that identifies a protocol used to authenticate a Subject. Please refer to draft-sstc-core-25 Section 7 for a list of URIs identifying common authentication protocols.
Throws:
SAMLException

createSubjectConfirmation

public SubjectConfirmation createSubjectConfirmation(List confirmationMethods,
                                                     Element subjectConfirmationData,
                                                     Element keyInfo)
                                              throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs a SubjectConfirmation instance.

Specified by:
createSubjectConfirmation in class SAMLAssertionFactory
Parameters:
confirmationMethods - A list of confirmationMethods each of which is a URI (String) that identifies a protocol used to authenticate a Subject. Please refer to draft-sstc-core-25 Section 7 for a list of URIs identifying common authentication protocols.
subjectConfirmationData - Additional authentication information to be used by a specific authentication protocol. Can be passed as null if there is no subjectConfirmationData for the SubjectConfirmation object.
keyInfo - An XML signature element that specifies a cryptographic key held by the Subject.
Throws:
SAMLException

createSubjectConfirmation

public SubjectConfirmation createSubjectConfirmation(List confirmationMethods,
                                                     SubjectConfirmationData scd,
                                                     KeyInfo keyInfo)
                                              throws SAMLException
Specified by:
createSubjectConfirmation in class SAMLAssertionFactory
Throws:
SAMLException

createSubjectConfirmation

public SubjectConfirmation createSubjectConfirmation(NameID nameID,
                                                     SubjectConfirmationData subjectConfirmationData,
                                                     String confirmationMethod)
                                              throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs a SubjectConfirmation instance.

Specified by:
createSubjectConfirmation in class SAMLAssertionFactory
Parameters:
nameID - NameID object.
subjectConfirmationData - Additional authentication information to be used by a specific authentication protocol. Can be passed as null if there is no subjectConfirmationData for the SubjectConfirmation object.
confirmationMethod - A list of confirmationMethods each of which is a URI (String) that identifies a protocol used to authenticate a Subject. Please refer to draft-sstc-core-25 Section 7 for a list of URIs identifying common authentication protocols.
Throws:
SAMLException

createSubjectConfirmation

public SubjectConfirmation createSubjectConfirmation(NameID nameID,
                                                     KeyInfoConfirmationData subjectConfirmationData,
                                                     String confirmationMethod)
                                              throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs a SubjectConfirmation instance.

Specified by:
createSubjectConfirmation in class SAMLAssertionFactory
Parameters:
nameID - NameID object.
subjectConfirmationData - Additional authentication information to be used by a specific authentication protocol. Can be passed as null if there is no KeyInfoConfirmationData for the SubjectConfirmation object.
confirmationMethod - A list of confirmationMethods each of which is a URI (String) that identifies a protocol used to authenticate a Subject. Please refer to draft-sstc-core-25 Section 7 for a list of URIs identifying common authentication protocols.
Throws:
SAMLException

createSubjectConfirmationData

public SubjectConfirmationData createSubjectConfirmationData(String address,
                                                             String inResponseTo,
                                                             GregorianCalendar notBefore,
                                                             GregorianCalendar notOnOrAfter,
                                                             String recipient,
                                                             Element keyInfo)
                                                      throws SAMLException
Specified by:
createSubjectConfirmationData in class SAMLAssertionFactory
Throws:
SAMLException

createSubjectConfirmationData

public SubjectConfirmationData createSubjectConfirmationData(String address,
                                                             String inResponseTo,
                                                             GregorianCalendar notBefore,
                                                             GregorianCalendar notOnOrAfter,
                                                             String recipient,
                                                             KeyInfo keyInfo)
                                                      throws SAMLException
Specified by:
createSubjectConfirmationData in class SAMLAssertionFactory
Throws:
SAMLException

createKeyInfoConfirmationData

public KeyInfoConfirmationData createKeyInfoConfirmationData(Element keyInfo)
                                                      throws SAMLException
Specified by:
createKeyInfoConfirmationData in class SAMLAssertionFactory
Throws:
SAMLException

createSubjectLocality

public SubjectLocality createSubjectLocality()
                                      throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs a SubjectLocality instance.

Specified by:
createSubjectLocality in class SAMLAssertionFactory
Throws:
SAMLException

createSubjectLocality

public SubjectLocality createSubjectLocality(String ipAddress,
                                             String dnsAddress)
                                      throws SAMLException
Description copied from class: SAMLAssertionFactory
Constructs an instance of SubjectLocality.

Specified by:
createSubjectLocality in class SAMLAssertionFactory
Parameters:
ipAddress - String representing the IP Address of the entity that was authenticated.
dnsAddress - String representing the DNS Address of the entity that was authenticated. As per SAML specification they are both optional, so values can be null.
Throws:
SAMLException

createAssertion

public Assertion createAssertion(XMLStreamReader reader)
                          throws SAMLException
Description copied from class: SAMLAssertionFactory
Creates and returns an Assertion object from the given SAML XMLStreamReader.

Specified by:
createAssertion in class SAMLAssertionFactory
Parameters:
reader - An XMLStreamReader representing the tree for an Assertion object
Throws:
SAMLException - if it could not process the Element properly, implying that there is an error in the sender or in the element definition.


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.