public abstract class SAMLAssertionFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SAML_VER_CHECK |
static String |
SAML1_1
SAML Version 1.1 & SAML Version 2.0
|
static String |
SAML2_0 |
| Modifier | Constructor and Description |
|---|---|
protected |
SAMLAssertionFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract Action |
createAction(String action,
String namespace)
Creates an
Action element. |
abstract Advice |
createAdvice(List assertionidreference,
List assertion,
List otherelement)
Creates an
Advice element. |
abstract AnyType |
createAnyType()
Creates an
AnyType element if the System property "com.sun.xml.wss.saml.binding.jaxb"
is set. |
abstract Assertion |
createAssertion(Element element)
Creates and returns an
Assertion object from the given SAML org.w3c.dom.Element. |
abstract 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. |
abstract 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. |
abstract 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. |
abstract Assertion |
createAssertion(String assertionID,
String issuer,
GregorianCalendar issueInstant,
Conditions conditions,
Advice advice,
List statements,
JAXBContext jcc) |
abstract Assertion |
createAssertion(XMLStreamReader reader)
Creates and returns an
Assertion object from the given SAML XMLStreamReader. |
abstract AssertionIDRef |
createAssertionIDRef()
Creates and returns an
AssertionIDRef object. |
abstract AssertionIDRef |
createAssertionIDRef(String id)
Creates and returns an
AssertionIDRef object. |
abstract AssertionIDReference |
createAssertionIDReference()
Creates and returns an
AssertionIDReference object. |
abstract AssertionIDReference |
createAssertionIDReference(String id)
Creates and returns an
AssertionIDReference object. |
abstract Attribute |
createAttribute(String name,
List values)
Constructs an instance of
Attribute. |
abstract Attribute |
createAttribute(String name,
String nameSpace,
List values)
Constructs an instance of
Attribute. |
abstract AttributeDesignator |
createAttributeDesignator(String name,
String nameSpace)
Constructs an instance of
AttributeDesignator. |
abstract AttributeStatement |
createAttributeStatement(List attr)
Constructs an instance of
AttributeStatement. |
abstract AttributeStatement |
createAttributeStatement(Subject subj,
List attr)
Constructs an instance of
AttributeStatement. |
abstract AudienceRestriction |
createAudienceRestriction(List audience)
Constructs an instance of
AudienceRestriction. |
abstract AudienceRestrictionCondition |
createAudienceRestrictionCondition(List audience)
Constructs an instance of
AudienceRestrictionCondition. |
abstract AuthenticationStatement |
createAuthenticationStatement(String authMethod,
GregorianCalendar authInstant,
Subject subject,
SubjectLocality subjectLocality,
List authorityBinding)
Constructs an instance of
AuthenticationStatement. |
abstract AuthnContext |
createAuthnContext() |
abstract AuthnContext |
createAuthnContext(String authContextClassref,
String authenticatingAuthority) |
abstract AuthnDecisionStatement |
createAuthnDecisionStatement(String resource,
String decision,
List action,
Evidence evidence)
Constructs an instance of
AuthnDecisionStatement. |
abstract AuthnStatement |
createAuthnStatement(GregorianCalendar authInstant,
SubjectLocality subjectLocality,
AuthnContext authnContext,
String sessionIndex,
GregorianCalendar sessionNotOnOrAfter)
Constructs an instance of
AuthenticationStatement. |
abstract AuthorityBinding |
createAuthorityBinding(QName authKind,
String location,
String binding)
Constructs an instance of
AuthorityBinding. |
abstract AuthorizationDecisionStatement |
createAuthorizationDecisionStatement(Subject subject,
String resource,
String decision,
List action,
Evidence evidence)
Constructs an instance of
AuthorizationDecisionStatement. |
abstract Conditions |
createConditions()
Constructs an instance of default
Conditions object. |
abstract Conditions |
createConditions(GregorianCalendar notBefore,
GregorianCalendar notOnOrAfter,
List condition,
List arc,
List doNotCacheCnd)
Constructs an instance of
Conditions. |
abstract Conditions |
createConditions(GregorianCalendar notBefore,
GregorianCalendar notOnOrAfter,
List condition,
List ar,
List oneTimeUse,
List proxyRestriction)
Constructs an instance of
Conditions. |
abstract DoNotCacheCondition |
createDoNotCacheCondition()
Constructs an instance of
DoNotCacheCondition |
abstract Evidence |
createEvidence(List assertionIDRef,
List assertion)
Constructs an Evidence from a List of
Assertion and
AssertionIDReference objects. |
abstract KeyInfoConfirmationData |
createKeyInfoConfirmationData(Element keyInfo) |
abstract NameID |
createNameID(String name,
String nameQualifier,
String format)
Constructs a
NameID instance. |
abstract NameIdentifier |
createNameIdentifier(String name,
String nameQualifier,
String format)
Constructs a
NameQualifier instance. |
abstract OneTimeUse |
createOneTimeUse() |
abstract Subject |
createSubject(NameIdentifier nameIdentifier,
SubjectConfirmation subjectConfirmation)
Constructs a Subject object from a
NameIdentifier
object and a SubjectConfirmation object. |
abstract Subject |
createSubject(NameID nameID,
SubjectConfirmation subjectConfirmation)
Constructs a Subject object from a
NameID
object and a SubjectConfirmation object. |
abstract SubjectConfirmation |
createSubjectConfirmation(List confirmationMethods,
Element subjectConfirmationData,
Element keyInfo)
Constructs a
SubjectConfirmation instance. |
abstract SubjectConfirmation |
createSubjectConfirmation(List confirmationMethods,
SubjectConfirmationData scd,
KeyInfo keyInfo) |
abstract SubjectConfirmation |
createSubjectConfirmation(NameID nameID,
KeyInfoConfirmationData keyInfoConfirmationData,
String confirmationMethods)
Constructs a
SubjectConfirmation instance. |
abstract SubjectConfirmation |
createSubjectConfirmation(NameID nameID,
String method)
Creates and returns a
SubjectConfirmation object. |
abstract SubjectConfirmation |
createSubjectConfirmation(NameID nameID,
SubjectConfirmationData subjectConfirmationData,
String confirmationMethods)
Constructs a
SubjectConfirmation instance. |
abstract SubjectConfirmation |
createSubjectConfirmation(String confirmationMethod)
Creates and returns a
SubjectConfirmation object. |
abstract SubjectConfirmationData |
createSubjectConfirmationData(String address,
String inResponseTo,
GregorianCalendar notBefore,
GregorianCalendar notOnOrAfter,
String recipient,
Element keyInfo) |
abstract SubjectConfirmationData |
createSubjectConfirmationData(String address,
String inResponseTo,
GregorianCalendar notBefore,
GregorianCalendar notOnOrAfter,
String recipient,
KeyInfo keyInfo) |
abstract SubjectLocality |
createSubjectLocality()
Constructs a
SubjectLocality instance. |
abstract SubjectLocality |
createSubjectLocality(String ipAddress,
String dnsAddress)
Constructs an instance of
SubjectLocality. |
static SAMLAssertionFactory |
newInstance(String samlVersion)
Create an instance of SAMLAssertionFactory.
|
public static final String SAML1_1
public static final String SAML2_0
public static String SAML_VER_CHECK
public static SAMLAssertionFactory newInstance(String samlVersion) throws XWSSecurityException
samlVersion - A String representing the saml version. Possible values {SAMLAssertionFactory.SAML1_1} & {SAMLAssertionFactory.SAML2_0}XWSSecurityExceptionpublic abstract Action createAction(String action, String namespace) throws SAMLException
Action element.namespace - The attribute "namespace" of
Action elementaction - A String representing an actionSAMLExceptionpublic abstract Advice createAdvice(List assertionidreference, List assertion, List otherelement) throws SAMLException
Advice element.assertionidreference - A List of AssertionIDReference.assertion - A List of Assertionotherelement - A List of any element defined asSAMLExceptionpublic abstract AnyType createAnyType() throws SAMLException
AnyType element if the System property "com.sun.xml.wss.saml.binding.jaxb"
is set. Otherwise returns null.SAMLExceptionpublic abstract Assertion createAssertion(String assertionID, String issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, List statements) throws SAMLException
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.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.SAMLException - if there is an error in processing input.public abstract Assertion createAssertion(String assertionID, String issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, List statements, JAXBContext jcc) throws SAMLException
SAMLExceptionpublic abstract Assertion createAssertion(String ID, NameID issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, Subject subject, List statements) throws SAMLException
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.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 Assertionstatements - 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.SAMLException - if there is an error in processing input.public abstract Assertion createAssertion(String ID, NameID issuer, GregorianCalendar issueInstant, Conditions conditions, Advice advice, Subject subject, List statements, JAXBContext jcc) throws SAMLException
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.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 Assertionstatements - 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.SAMLException - if there is an error in processing input.public abstract Assertion createAssertion(Element element) throws SAMLException
Assertion object from the given SAML org.w3c.dom.Element.element - A org.w3c.dom.Element representing
DOM tree for Assertion objectSAMLException - if it could not process the Element properly,
implying that there is an error in the sender or in the
element definition.public abstract Assertion createAssertion(XMLStreamReader reader) throws SAMLException
Assertion object from the given SAML XMLStreamReader.reader - An XMLStreamReader representing
the tree for an Assertion objectSAMLException - if it could not process the Element properly,
implying that there is an error in the sender or in the
element definition.public abstract AssertionIDReference createAssertionIDReference() throws SAMLException
AssertionIDReference object. AssertionID
will be generated automatically.SAMLExceptionpublic abstract AssertionIDRef createAssertionIDRef() throws SAMLException
AssertionIDRef object. AssertionID
will be generated automatically.SAMLExceptionpublic abstract AssertionIDReference createAssertionIDReference(String id) throws SAMLException
AssertionIDReference object.id - String of an AssertionIDSAMLExceptionpublic abstract AssertionIDRef createAssertionIDRef(String id) throws SAMLException
AssertionIDRef object.id - String of an AssertionIDSAMLExceptionpublic abstract Attribute createAttribute(String name, String nameSpace, List values) throws SAMLException
Attribute.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.SAMLExceptionpublic abstract Attribute createAttribute(String name, List values) throws SAMLException
Attribute.name - A String representing AttributeName (the name
of the attribute).values - A List representing the AttributeValue object.SAMLExceptionpublic abstract AttributeDesignator createAttributeDesignator(String name, String nameSpace) throws SAMLException
AttributeDesignator.name - the name of the attribute.nameSpace - the namespace in which AttributeName
elements are interpreted.SAMLExceptionpublic abstract AttributeStatement createAttributeStatement(Subject subj, List attr) throws SAMLException
AttributeStatement.subj - SAML Subjectattr - List of attributesSAMLExceptionpublic abstract AttributeStatement createAttributeStatement(List attr) throws SAMLException
AttributeStatement.attr - List of attributesSAMLExceptionpublic abstract AudienceRestrictionCondition createAudienceRestrictionCondition(List audience) throws SAMLException
AudienceRestrictionCondition.
It takes in a List of audience for this
condition, each of them being a String.audience - A List of audience to be included within this conditionSAMLExceptionpublic abstract AudienceRestriction createAudienceRestriction(List audience) throws SAMLException
AudienceRestriction.
It takes in a List of audience for this
condition, each of them being a String.audience - A List of audience to be included within this conditionSAMLExceptionpublic abstract AuthenticationStatement createAuthenticationStatement(String authMethod, GregorianCalendar authInstant, Subject subject, SubjectLocality subjectLocality, List authorityBinding) throws SAMLException
AuthenticationStatement.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) A SubjectLocality object. Pass null if not required.authorityBinding - (optional) A List of AuthorityBinding. Pass null if not required.
objects.SAMLExceptionpublic abstract AuthnStatement createAuthnStatement(GregorianCalendar authInstant, SubjectLocality subjectLocality, AuthnContext authnContext, String sessionIndex, GregorianCalendar sessionNotOnOrAfter) throws SAMLException
AuthenticationStatement.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.SAMLExceptionpublic abstract AuthorityBinding createAuthorityBinding(QName authKind, String location, String binding) throws SAMLException
AuthorityBinding.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.SAMLExceptionpublic abstract AuthnContext createAuthnContext() throws SAMLException
SAMLExceptionpublic abstract AuthnContext createAuthnContext(String authContextClassref, String authenticatingAuthority) throws SAMLException
SAMLExceptionpublic abstract AuthorizationDecisionStatement createAuthorizationDecisionStatement(Subject subject, String resource, String decision, List action, Evidence evidence) throws SAMLException
AuthorizationDecisionStatement.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.SAMLExceptionpublic abstract AuthnDecisionStatement createAuthnDecisionStatement(String resource, String decision, List action, Evidence evidence) throws SAMLException
AuthnDecisionStatement.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.SAMLExceptionpublic abstract Conditions createConditions() throws SAMLException
Conditions object.SAMLExceptionpublic abstract Conditions createConditions(GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, List condition, List arc, List doNotCacheCnd) throws SAMLException
Conditions.notBefore - specifies the earliest time instant at which the
assertion is valid.notOnOrAfter - specifies the time instant at which the assertion
has expired.condition - arc - the AudienceRestrictionCondition to be
added. Can be null, if no audience restriction.doNotCacheCnd - SAMLExceptionpublic abstract Conditions createConditions(GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, List condition, List ar, List oneTimeUse, List proxyRestriction) throws SAMLException
Conditions.notBefore - specifies the earliest time instant at which the
assertion is valid.notOnOrAfter - specifies the time instant at which the assertion
has expired.condition - ar - the AudienceRestriction to be
added. Can be null, if no audience restriction.oneTimeUse - proxyRestriction - SAMLExceptionpublic abstract DoNotCacheCondition createDoNotCacheCondition() throws SAMLException
DoNotCacheConditionSAMLExceptionpublic abstract OneTimeUse createOneTimeUse() throws SAMLException
SAMLExceptionpublic abstract Evidence createEvidence(List assertionIDRef, List assertion) throws SAMLException
Assertion and
AssertionIDReference objects.assertionIDRef - List of AssertionIDReference objects.assertion - List of Assertion objects.SAMLExceptionpublic abstract NameIdentifier createNameIdentifier(String name, String nameQualifier, String format) throws SAMLException
NameQualifier instance.name - The string representing the name of the SubjectnameQualifier - 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.SAMLExceptionpublic abstract NameID createNameID(String name, String nameQualifier, String format) throws SAMLException
NameID instance.name - The string representing the name of the SubjectnameQualifier - 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.SAMLExceptionpublic abstract Subject createSubject(NameIdentifier nameIdentifier, SubjectConfirmation subjectConfirmation) throws SAMLException
NameIdentifier
object and a SubjectConfirmation object.nameIdentifier - NameIdentifier object.subjectConfirmation - SubjectConfirmation object.SAMLExceptionpublic abstract Subject createSubject(NameID nameID, SubjectConfirmation subjectConfirmation) throws SAMLException
NameID
object and a SubjectConfirmation object.nameID - NameID object.subjectConfirmation - SubjectConfirmation object.SAMLExceptionpublic abstract SubjectConfirmation createSubjectConfirmation(String confirmationMethod) throws SAMLException
SubjectConfirmation object.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.SAMLExceptionpublic abstract SubjectConfirmation createSubjectConfirmation(NameID nameID, String method) throws SAMLException
SubjectConfirmation object.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.SAMLExceptionpublic abstract SubjectConfirmation createSubjectConfirmation(List confirmationMethods, SubjectConfirmationData scd, KeyInfo keyInfo) throws SAMLException
SAMLExceptionpublic abstract SubjectConfirmation createSubjectConfirmation(List confirmationMethods, Element subjectConfirmationData, Element keyInfo) throws SAMLException
SubjectConfirmation instance.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.SAMLExceptionpublic abstract SubjectConfirmation createSubjectConfirmation(NameID nameID, SubjectConfirmationData subjectConfirmationData, String confirmationMethods) throws SAMLException
SubjectConfirmation instance.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.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.SAMLExceptionpublic abstract SubjectConfirmation createSubjectConfirmation(NameID nameID, KeyInfoConfirmationData keyInfoConfirmationData, String confirmationMethods) throws SAMLException
SubjectConfirmation instance.nameID - NameID object.keyInfoConfirmationData - 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.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.SAMLExceptionpublic abstract SubjectConfirmationData createSubjectConfirmationData(String address, String inResponseTo, GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, String recipient, Element keyInfo) throws SAMLException
SAMLExceptionpublic abstract SubjectConfirmationData createSubjectConfirmationData(String address, String inResponseTo, GregorianCalendar notBefore, GregorianCalendar notOnOrAfter, String recipient, KeyInfo keyInfo) throws SAMLException
SAMLExceptionpublic abstract KeyInfoConfirmationData createKeyInfoConfirmationData(Element keyInfo) throws SAMLException
SAMLExceptionpublic abstract SubjectLocality createSubjectLocality() throws SAMLException
SubjectLocality instance.SAMLExceptionpublic abstract SubjectLocality createSubjectLocality(String ipAddress, String dnsAddress) throws SAMLException
SubjectLocality.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.SAMLExceptionCopyright © 2005–2018 Oracle Corporation. All rights reserved.