@Immutable public class SAML2AssertionDetails extends AssertionDetails
Used for SAML 2.0 bearer
assertion grants
.
Example SAML 2.0 assertion:
<Assertion IssueInstant="2010-10-01T20:07:34.619Z" ID="ef1xsbZxPV2oqjd7HTLRLIBlBb7" Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"> <Issuer>https://saml-idp.example.com</Issuer> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> [...omitted for brevity...] </ds:Signature> <Subject> <NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"> [email protected] </NameID> <SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> <SubjectConfirmationData NotOnOrAfter="2010-10-01T20:12:34.619Z" Recipient="https://authz.example.net/token.oauth2"/> </SubjectConfirmation> </Subject> <Conditions> <AudienceRestriction> <Audience>https://saml-sp.example.net</Audience> </AudienceRestriction> </Conditions> <AuthnStatement AuthnInstant="2010-10-01T20:07:34.371Z"> <AuthnContext> <AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</AuthnContextClassRef> </AuthnContext> </AuthnStatement> </Assertion>
Related specifications:
Constructor and Description |
---|
SAML2AssertionDetails(Issuer issuer,
Subject subject,
Audience audience)
Creates a new SAML 2.0 bearer assertion details instance.
|
SAML2AssertionDetails(Issuer issuer,
Subject subject,
String subjectFormat,
Date subjectAuthTime,
ACR subjectACR,
List<Audience> audience,
Date exp,
Date nbf,
Date iat,
Identifier id,
InetAddress clientAddress,
Map<String,List<String>> attrStatement)
Creates a new SAML 2.0 bearer assertion details instance.
|
Modifier and Type | Method and Description |
---|---|
Map<String,List<String>> |
getAttributeStatement()
Returns the optional attribute statement.
|
InetAddress |
getClientInetAddress()
Returns the optional client address to which this assertion is
bound.
|
Date |
getNotBeforeTime()
Returns the optional not-before time.
|
ACR |
getSubjectACR()
Returns the optional subject Authentication Context Class Reference
(ACR).
|
Date |
getSubjectAuthenticationTime()
Returns the optional subject authentication time.
|
String |
getSubjectFormat()
Returns the optional subject format.
|
static SAML2AssertionDetails |
parse(org.opensaml.saml2.core.Assertion assertion)
Parses a SAML 2.0 bearer assertion details instance from the
specified assertion object.
|
org.opensaml.saml2.core.Assertion |
toSAML2Assertion()
Returns a SAML 2.0 assertion (unsigned) representation of this
assertion details instance.
|
getAudience, getExpirationTime, getID, getIssuer, getIssueTime, getSubject
public SAML2AssertionDetails(Issuer issuer, Subject subject, Audience audience)
issuer
- The issuer. Must not be null
.subject
- The subject. Must not be null
.audience
- The audience, typically the URI of the authorisation
server's token endpoint. Must not be null
.public SAML2AssertionDetails(Issuer issuer, Subject subject, String subjectFormat, Date subjectAuthTime, ACR subjectACR, List<Audience> audience, Date exp, Date nbf, Date iat, Identifier id, InetAddress clientAddress, Map<String,List<String>> attrStatement)
issuer
- The issuer. Must not be null
.subject
- The subject. Must not be null
.subjectFormat
- The subject format, null
if not
specified.subjectAuthTime
- The subject authentication time, null
if not specified.subjectACR
- The subject Authentication Context Class
Reference (ACR), null
if not
specified.audience
- The audience, typically including the URI of the
authorisation server's token endpoint. Must not be
null
.exp
- The expiration time. Must not be null
.nbf
- The time before which the assertion must not
be accepted for processing, null
if
not specified.iat
- The time at which the assertion was issued.
Must not be null
.id
- Unique identifier for the assertion. Must not
be null
.clientAddress
- The client address, null
if not
specified.attrStatement
- The attribute statement (in simplified form),
null
if not specified.public String getSubjectFormat()
null
if not specified.public Date getSubjectAuthenticationTime()
null
if not
specified.public ACR getSubjectACR()
null
if not specified.public Date getNotBeforeTime()
null
if not specified.public InetAddress getClientInetAddress()
null
if not specified.public Map<String,List<String>> getAttributeStatement()
null
if not specified.public org.opensaml.saml2.core.Assertion toSAML2Assertion() throws SerializeException
SerializeException
- If serialisation failed.public static SAML2AssertionDetails parse(org.opensaml.saml2.core.Assertion assertion) throws ParseException
assertion
- The assertion. Must not be null
.ParseException
- If the assertion couldn't be parsed to a
SAML 2.0 bearer assertion details instance.Copyright © 2016 Connect2id Ltd.. All Rights Reserved.