Package com.sun.xml.wss.saml.impl
Class SAMLAssertion2_1FactoryImpl
- java.lang.Object
-
- com.sun.xml.wss.saml.SAMLAssertionFactory
-
- com.sun.xml.wss.saml.impl.SAMLAssertion2_1FactoryImpl
-
public class SAMLAssertion2_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
Constructors Constructor Description SAMLAssertion2_1FactoryImpl()Creates a new instance of SAMLAssertion1_1FactoryImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActioncreateAction(String action, String namespace)Creates anActionelement.ActioncreateAction(Element actionElement)AdvicecreateAdvice(List assertionidreference, List assertion, List otherelement)Creates anAdviceelement.AnyTypecreateAnyType()Creates anAnyTypeelement if the System property "com.sun.xml.wss.saml.binding.jaxb" is set.AssertioncreateAssertion(String ID, NameID issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, Subject subject, List statements)Creates and return an Assertion from the data members: theID, the issuer, time when assertion issued, the conditions when creating a new assertion ,Adviceapplicable to thisAssertion,Subjectand a set ofStatement(s) in the assertion.AssertioncreateAssertion(String ID, NameID issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, Subject subject, List statements, jakarta.xml.bind.JAXBContext jcc)Creates and return an Assertion from the data members: theID, the issuer, time when assertion issued, the conditions when creating a new assertion ,Adviceapplicable to thisAssertion,Subject, a set ofStatement(s) ,and a jaxbcontext for the assertion.AssertioncreateAssertion(String assertionID, String issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, List statements)Creates and return an Assertion from the data members: theassertionID, the issuer, time when assertion issued, the conditions when creating a new assertion ,Adviceapplicable to thisAssertionand a set ofStatement(s) in the assertion.AssertioncreateAssertion(String assertionID, String issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, List statements, jakarta.xml.bind.JAXBContext jcc)AssertioncreateAssertion(XMLStreamReader reader)Creates and returns anAssertionobject from the given SAMLXMLStreamReader.AssertioncreateAssertion(Element element)Creates and returns anAssertionobject from the given SAMLorg.w3c.dom.Element.AssertionIDRefcreateAssertionIDRef()Creates and returns anAssertionIDRefobject.AssertionIDRefcreateAssertionIDRef(String id)Creates and returns anAssertionIDRefobject.AssertionIDReferencecreateAssertionIDReference()Creates and returns anAssertionIDReferenceobject.AssertionIDReferencecreateAssertionIDReference(String id)Creates and returns anAssertionIDReferenceobject.AttributecreateAttribute(String name, String nameSpace, List values)Constructs an instance ofAttribute.AttributecreateAttribute(String name, List values)Constructs an instance ofAttribute.AttributeDesignatorcreateAttributeDesignator(String name, String nameSpace)Constructs an instance ofAttributeDesignator.AttributeStatementcreateAttributeStatement(Subject subj, List attr)Constructs an instance ofAttributeStatement.AttributeStatementcreateAttributeStatement(List attr)Constructs an instance ofAttributeStatement.AudienceRestrictioncreateAudienceRestriction(List audience)Constructs an instance ofAudienceRestriction.AudienceRestrictionConditioncreateAudienceRestrictionCondition(List audience)Constructs an instance ofAudienceRestrictionCondition.AuthenticationStatementcreateAuthenticationStatement(String authMethod, GregorianCalendar authInstant, Subject subject, SubjectLocality subjectLocality, List authorityBinding)Constructs an instance ofAuthenticationStatement.AuthnContextcreateAuthnContext()AuthnContextcreateAuthnContext(String authContextClassref, String authenticatingAuthority)AuthnDecisionStatementcreateAuthnDecisionStatement(String resource, String decision, List action, Evidence evidence)Constructs an instance ofAuthnDecisionStatement.AuthnStatementcreateAuthnStatement(GregorianCalendar authInstant, SubjectLocality subjectLocality, AuthnContext authnContext, String sessionIndex, GregorianCalendar sessionNotOnOrAfter)Constructs an instance ofAuthenticationStatement.AuthorityBindingcreateAuthorityBinding(QName authKind, String location, String binding)Constructs an instance ofAuthorityBinding.AuthorizationDecisionStatementcreateAuthorizationDecisionStatement(Subject subject, String resource, String decision, List action, Evidence evidence)Constructs an instance ofAuthorizationDecisionStatement.ConditionscreateConditions()Constructs an instance of defaultConditionsobject.ConditionscreateConditions(GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, List condition, List arc, List doNotCacheCnd)Constructs an instance ofConditions.ConditionscreateConditions(GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, List condition, List ar, List oneTimeUse, List proxyRestriction)Constructs an instance ofConditions.DoNotCacheConditioncreateDoNotCacheCondition()Constructs an instance ofDoNotCacheConditionEvidencecreateEvidence(List assertionIDRef, List assertion)Constructs an Evidence from a List ofAssertionandAssertionIDReferenceobjects.KeyInfoConfirmationDatacreateKeyInfoConfirmationData(Element keyInfo)NameIDcreateNameID(String name, String nameQualifier, String format)Constructs aNameIDinstance.NameIdentifiercreateNameIdentifier(String name, String nameQualifier, String format)Constructs aNameQualifierinstance.OneTimeUsecreateOneTimeUse()SubjectcreateSubject(NameIdentifier nameIdentifier, SubjectConfirmation subjectConfirmation)Constructs a Subject object from aNameIdentifierobject and aSubjectConfirmationobject.SubjectcreateSubject(NameID nameID, SubjectConfirmation subjectConfirmation)Constructs a Subject object from aNameIDobject and aSubjectConfirmationobject.SubjectConfirmationcreateSubjectConfirmation(NameID nameID, KeyInfoConfirmationData subjectConfirmationData, String confirmationMethod)Constructs aSubjectConfirmationinstance.SubjectConfirmationcreateSubjectConfirmation(NameID nameID, SubjectConfirmationData subjectConfirmationData, String confirmationMethod)Constructs aSubjectConfirmationinstance.SubjectConfirmationcreateSubjectConfirmation(NameID nameID, String method)Creates and returns aSubjectConfirmationobject.SubjectConfirmationcreateSubjectConfirmation(String confirmationMethod)Creates and returns aSubjectConfirmationobject.SubjectConfirmationcreateSubjectConfirmation(List confirmationMethods, SubjectConfirmationData scd, com.sun.xml.ws.security.opt.crypto.dsig.keyinfo.KeyInfo keyInfo)SubjectConfirmationcreateSubjectConfirmation(List confirmationMethods, Element subjectConfirmationData, Element keyInfo)Constructs aSubjectConfirmationinstance.SubjectConfirmationDatacreateSubjectConfirmationData(String address, String inResponseTo, GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, String recipient, com.sun.xml.ws.security.opt.crypto.dsig.keyinfo.KeyInfo keyInfo)SubjectConfirmationDatacreateSubjectConfirmationData(String address, String inResponseTo, GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, String recipient, Element keyInfo)SubjectLocalitycreateSubjectLocality()Constructs aSubjectLocalityinstance.SubjectLocalitycreateSubjectLocality(String ipAddress, String dnsAddress)Constructs an instance ofSubjectLocality.-
Methods inherited from class com.sun.xml.wss.saml.SAMLAssertionFactory
newInstance
-
-
-
-
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:SAMLAssertionFactoryCreates anActionelement.- Specified by:
createActionin classSAMLAssertionFactory- Parameters:
action- A String representing an actionnamespace- The attribute "namespace" ofActionelement- Throws:
SAMLException
-
createAdvice
public Advice createAdvice(List assertionidreference, List assertion, List otherelement) throws SAMLException
Description copied from class:SAMLAssertionFactoryCreates anAdviceelement.- Specified by:
createAdvicein classSAMLAssertionFactory- Parameters:
assertionidreference- A List ofAssertionIDReference.assertion- A List of Assertionotherelement- A List of any element defined as- Throws:
SAMLException
-
createAnyType
public AnyType createAnyType() throws SAMLException
Description copied from class:SAMLAssertionFactoryCreates anAnyTypeelement if the System property "com.sun.xml.wss.saml.binding.jaxb" is set. Otherwise returns null.- Specified by:
createAnyTypein classSAMLAssertionFactory- Throws:
SAMLException
-
createAssertion
public Assertion createAssertion(Element element) throws SAMLException
Description copied from class:SAMLAssertionFactoryCreates and returns anAssertionobject from the given SAMLorg.w3c.dom.Element.- Specified by:
createAssertionin classSAMLAssertionFactory- Parameters:
element- Aorg.w3c.dom.Elementrepresenting DOM tree forAssertionobject- 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:SAMLAssertionFactoryCreates and return an Assertion from the data members: theassertionID, the issuer, time when assertion issued, the conditions when creating a new assertion ,Adviceapplicable to thisAssertionand a set ofStatement(s) in the assertion.- Specified by:
createAssertionin classSAMLAssertionFactory- Parameters:
assertionID-AssertionIDobject contained within thisAssertionif null its generated internally.issuer- The issuer of this assertion.issueInstant- Time instant of the issue. It has typedateTimewhich is built in to the W3C XML Schema Types specification. if null, current time is used.conditions-Conditionsunder which the thisAssertionis valid.advice-Adviceapplicable for thisAssertion.statements- List ofStatementobjects within thisAssertion. It could be of typeAuthenticationStatement,AuthorizationDecisionStatementandAttributeStatement. 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, jakarta.xml.bind.JAXBContext jcc) throws SAMLException
- Specified by:
createAssertionin classSAMLAssertionFactory- 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:SAMLAssertionFactoryCreates and return an Assertion from the data members: theID, the issuer, time when assertion issued, the conditions when creating a new assertion ,Adviceapplicable to thisAssertion,Subjectand a set ofStatement(s) in the assertion.- Specified by:
createAssertionin classSAMLAssertionFactory- Parameters:
ID-IDobject contained within thisAssertionif null its generated internally.issuer- The issuer of this assertion.issueInstant- Time instant of the issue. It has typedateTimewhich is built in to the W3C XML Schema Types specification. if null, current time is used.conditions-Conditionsunder which the thisAssertionis valid.advice-Adviceapplicable for thisAssertion.subject-Subjectapplicable for thisAssertionstatements- List ofStatementobjects within thisAssertion. It could be of typeAuthnStatement,AuthzDecisionStatementandAttributeStatement. 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, jakarta.xml.bind.JAXBContext jcc) throws SAMLException
Description copied from class:SAMLAssertionFactoryCreates and return an Assertion from the data members: theID, the issuer, time when assertion issued, the conditions when creating a new assertion ,Adviceapplicable to thisAssertion,Subject, a set ofStatement(s) ,and a jaxbcontext for the assertion.- Specified by:
createAssertionin classSAMLAssertionFactory- Parameters:
ID-IDobject contained within thisAssertionif null its generated internally.issuer- The issuer of this assertion.issueInstant- Time instant of the issue. It has typedateTimewhich is built in to the W3C XML Schema Types specification. if null, current time is used.conditions-Conditionsunder which the thisAssertionis valid.advice-Adviceapplicable for thisAssertion.subject-Subjectapplicable for thisAssertionstatements- List ofStatementobjects within thisAssertion. It could be of typeAuthnStatement,AuthzDecisionStatementandAttributeStatement. 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:SAMLAssertionFactoryCreates and returns anAssertionIDReferenceobject. AssertionID will be generated automatically.- Specified by:
createAssertionIDReferencein classSAMLAssertionFactory- 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:SAMLAssertionFactoryCreates and returns anAssertionIDRefobject. AssertionID will be generated automatically.- Specified by:
createAssertionIDRefin classSAMLAssertionFactory- 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:SAMLAssertionFactoryCreates and returns anAssertionIDReferenceobject.- Specified by:
createAssertionIDReferencein classSAMLAssertionFactory- Parameters:
id-Stringof 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:SAMLAssertionFactoryCreates and returns anAssertionIDRefobject.- Specified by:
createAssertionIDRefin classSAMLAssertionFactory- Parameters:
id-Stringof 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:SAMLAssertionFactoryConstructs an instance ofAttribute.- Specified by:
createAttributein classSAMLAssertionFactory- Parameters:
name- A String representingAttributeName(the name of the attribute).nameSpace- A String representing the namespace in whichAttributeNameelements are interpreted.values- A List representing theAttributeValueobject.- Throws:
SAMLException
-
createAttribute
public Attribute createAttribute(String name, List values) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an instance ofAttribute.- Specified by:
createAttributein classSAMLAssertionFactory- Parameters:
name- A String representingAttributeName(the name of the attribute).values- A List representing theAttributeValueobject.- Throws:
SAMLException
-
createAttributeDesignator
public AttributeDesignator createAttributeDesignator(String name, String nameSpace) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an instance ofAttributeDesignator.- Specified by:
createAttributeDesignatorin classSAMLAssertionFactory- Parameters:
name- the name of the attribute.nameSpace- the namespace in whichAttributeNameelements are interpreted.- Throws:
SAMLException
-
createAttributeStatement
public AttributeStatement createAttributeStatement(Subject subj, List attr) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an instance ofAttributeStatement.- Specified by:
createAttributeStatementin classSAMLAssertionFactory- Parameters:
subj- SAML Subjectattr- List of attributes- Throws:
SAMLException
-
createAttributeStatement
public AttributeStatement createAttributeStatement(List attr) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an instance ofAttributeStatement.- Specified by:
createAttributeStatementin classSAMLAssertionFactory- Parameters:
attr- List of attributes- Throws:
SAMLException
-
createAudienceRestrictionCondition
public AudienceRestrictionCondition createAudienceRestrictionCondition(List audience) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an instance ofAudienceRestrictionCondition. It takes in aListof audience for this condition, each of them being a String.- Specified by:
createAudienceRestrictionConditionin classSAMLAssertionFactory- 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:SAMLAssertionFactoryConstructs an instance ofAudienceRestriction. It takes in aListof audience for this condition, each of them being a String.- Specified by:
createAudienceRestrictionin classSAMLAssertionFactory- 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:SAMLAssertionFactoryConstructs an instance ofAuthenticationStatement.- Specified by:
createAuthenticationStatementin classSAMLAssertionFactory- 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 objectsubjectLocality- (optional) ASubjectLocalityobject. Pass null if not required.authorityBinding- (optional) A List ofAuthorityBinding. 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:SAMLAssertionFactoryConstructs an instance ofAuthenticationStatement.- Specified by:
createAuthnStatementin classSAMLAssertionFactory- Parameters:
authInstant- (optional) A GregorianCalendar object specifing the time at which the authentication that took place. Pass null if not required.subjectLocality- (optional) ASubjectLocalityobject. Pass null if not required.authnContext- (optional) AAuthnContextobject. Pass null if not required. objects.- Throws:
SAMLException
-
createAuthorityBinding
public AuthorityBinding createAuthorityBinding(QName authKind, String location, String binding) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an instance ofAuthorityBinding.- Specified by:
createAuthorityBindingin classSAMLAssertionFactory- 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:
createAuthnContextin classSAMLAssertionFactory- Throws:
SAMLException
-
createAuthnContext
public AuthnContext createAuthnContext(String authContextClassref, String authenticatingAuthority) throws SAMLException
- Specified by:
createAuthnContextin classSAMLAssertionFactory- Throws:
SAMLException
-
createAuthorizationDecisionStatement
public AuthorizationDecisionStatement createAuthorizationDecisionStatement(Subject subject, String resource, String decision, List action, Evidence evidence) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an instance ofAuthorizationDecisionStatement.- Specified by:
createAuthorizationDecisionStatementin classSAMLAssertionFactory- Parameters:
subject- (required) A Subject objectresource- (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:SAMLAssertionFactoryConstructs an instance ofAuthnDecisionStatement.- Specified by:
createAuthnDecisionStatementin classSAMLAssertionFactory- 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) AnEvidenceobject 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:SAMLAssertionFactoryConstructs an instance of defaultConditionsobject.- Specified by:
createConditionsin classSAMLAssertionFactory- Throws:
SAMLException
-
createConditions
public Conditions createConditions(GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, List condition, List arc, List doNotCacheCnd) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an instance ofConditions.- Specified by:
createConditionsin classSAMLAssertionFactory- 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- theAudienceRestrictionConditionto 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:SAMLAssertionFactoryConstructs an instance ofConditions.- Specified by:
createConditionsin classSAMLAssertionFactory- 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- theAudienceRestrictionto be added. Can be null, if no audience restriction.- Throws:
SAMLException
-
createDoNotCacheCondition
public DoNotCacheCondition createDoNotCacheCondition() throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an instance ofDoNotCacheCondition- Specified by:
createDoNotCacheConditionin classSAMLAssertionFactory- Throws:
SAMLException
-
createOneTimeUse
public OneTimeUse createOneTimeUse() throws SAMLException
- Specified by:
createOneTimeUsein classSAMLAssertionFactory- Throws:
SAMLException
-
createEvidence
public Evidence createEvidence(List assertionIDRef, List assertion) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an Evidence from a List ofAssertionandAssertionIDReferenceobjects.- Specified by:
createEvidencein classSAMLAssertionFactory- Parameters:
assertionIDRef- List ofAssertionIDReferenceobjects.assertion- List ofAssertionobjects.- Throws:
SAMLException
-
createNameIdentifier
public NameIdentifier createNameIdentifier(String name, String nameQualifier, String format) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs aNameQualifierinstance.- Specified by:
createNameIdentifierin classSAMLAssertionFactory- Parameters:
name- The string representing the name of the SubjectnameQualifier- The security or administrative domain that qualifies the name of theSubject. This is optional could be null.format- The syntax used to describe the name of theSubject. This optional, could be null.- Throws:
SAMLException
-
createNameID
public NameID createNameID(String name, String nameQualifier, String format) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs aNameIDinstance.- Specified by:
createNameIDin classSAMLAssertionFactory- Parameters:
name- The string representing the name of the SubjectnameQualifier- The security or administrative domain that qualifies the name of theSubject. This is optional could be null.format- The syntax used to describe the name of theSubject. This optional, could be null.- Throws:
SAMLException
-
createSubject
public Subject createSubject(NameIdentifier nameIdentifier, SubjectConfirmation subjectConfirmation) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs a Subject object from aNameIdentifierobject and aSubjectConfirmationobject.- Specified by:
createSubjectin classSAMLAssertionFactory- Parameters:
nameIdentifier-NameIdentifierobject.subjectConfirmation-SubjectConfirmationobject.- Throws:
SAMLException
-
createSubject
public Subject createSubject(NameID nameID, SubjectConfirmation subjectConfirmation) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs a Subject object from aNameIDobject and aSubjectConfirmationobject.- Specified by:
createSubjectin classSAMLAssertionFactory- Parameters:
nameID-NameIDobject.subjectConfirmation-SubjectConfirmationobject.- Throws:
SAMLException
-
createSubjectConfirmation
public SubjectConfirmation createSubjectConfirmation(String confirmationMethod) throws SAMLException
Description copied from class:SAMLAssertionFactoryCreates and returns aSubjectConfirmationobject.- Specified by:
createSubjectConfirmationin classSAMLAssertionFactory- Parameters:
confirmationMethod- A URI (String) that identifies a protocol used to authenticate aSubject. Please refer todraft-sstc-core-25Section 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:SAMLAssertionFactoryCreates and returns aSubjectConfirmationobject.- Specified by:
createSubjectConfirmationin classSAMLAssertionFactory- Parameters:
nameID-NameIDobject.method- A URI (String) that identifies a protocol used to authenticate aSubject. Please refer todraft-sstc-core-25Section 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:SAMLAssertionFactoryConstructs aSubjectConfirmationinstance.- Specified by:
createSubjectConfirmationin classSAMLAssertionFactory- Parameters:
confirmationMethods- A list ofconfirmationMethodseach of which is a URI (String) that identifies a protocol used to authenticate aSubject. Please refer todraft-sstc-core-25Section 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 nosubjectConfirmationDatafor theSubjectConfirmationobject.keyInfo- An XML signature element that specifies a cryptographic key held by theSubject.- Throws:
SAMLException
-
createSubjectConfirmation
public SubjectConfirmation createSubjectConfirmation(List confirmationMethods, SubjectConfirmationData scd, com.sun.xml.ws.security.opt.crypto.dsig.keyinfo.KeyInfo keyInfo) throws SAMLException
- Specified by:
createSubjectConfirmationin classSAMLAssertionFactory- Throws:
SAMLException
-
createSubjectConfirmation
public SubjectConfirmation createSubjectConfirmation(NameID nameID, SubjectConfirmationData subjectConfirmationData, String confirmationMethod) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs aSubjectConfirmationinstance.- Specified by:
createSubjectConfirmationin classSAMLAssertionFactory- Parameters:
nameID-NameIDobject.subjectConfirmationData- Additional authentication information to be used by a specific authentication protocol. Can be passed as null if there is nosubjectConfirmationDatafor theSubjectConfirmationobject.confirmationMethod- A list ofconfirmationMethodseach of which is a URI (String) that identifies a protocol used to authenticate aSubject. Please refer todraft-sstc-core-25Section 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:SAMLAssertionFactoryConstructs aSubjectConfirmationinstance.- Specified by:
createSubjectConfirmationin classSAMLAssertionFactory- Parameters:
nameID-NameIDobject.subjectConfirmationData- Additional authentication information to be used by a specific authentication protocol. Can be passed as null if there is noKeyInfoConfirmationDatafor theSubjectConfirmationobject.confirmationMethod- A list ofconfirmationMethodseach of which is a URI (String) that identifies a protocol used to authenticate aSubject. Please refer todraft-sstc-core-25Section 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:
createSubjectConfirmationDatain classSAMLAssertionFactory- Throws:
SAMLException
-
createSubjectConfirmationData
public SubjectConfirmationData createSubjectConfirmationData(String address, String inResponseTo, GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, String recipient, com.sun.xml.ws.security.opt.crypto.dsig.keyinfo.KeyInfo keyInfo) throws SAMLException
- Specified by:
createSubjectConfirmationDatain classSAMLAssertionFactory- Throws:
SAMLException
-
createKeyInfoConfirmationData
public KeyInfoConfirmationData createKeyInfoConfirmationData(Element keyInfo) throws SAMLException
- Specified by:
createKeyInfoConfirmationDatain classSAMLAssertionFactory- Throws:
SAMLException
-
createSubjectLocality
public SubjectLocality createSubjectLocality() throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs aSubjectLocalityinstance.- Specified by:
createSubjectLocalityin classSAMLAssertionFactory- Throws:
SAMLException
-
createSubjectLocality
public SubjectLocality createSubjectLocality(String ipAddress, String dnsAddress) throws SAMLException
Description copied from class:SAMLAssertionFactoryConstructs an instance ofSubjectLocality.- Specified by:
createSubjectLocalityin classSAMLAssertionFactory- 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:SAMLAssertionFactoryCreates and returns anAssertionobject from the given SAMLXMLStreamReader.- Specified by:
createAssertionin classSAMLAssertionFactory- Parameters:
reader- AnXMLStreamReaderrepresenting the tree for anAssertionobject- Throws:
SAMLException- if it could not process the Element properly, implying that there is an error in the sender or in the element definition.
-
-