public interface SamlTokenFactory
| Modifier and Type | Method and Description |
|---|---|
SamlToken |
parseToken(Element tokenRoot)
Create a
SamlToken object from DOM Element, performing
syntactic and semantical validation of the XML tree. |
SamlToken |
parseToken(Element tokenRoot,
X509Certificate... trustedRootCertificates)
Create a
SamlToken object from DOM Element. |
SamlToken |
parseToken(Element tokenRoot,
X509Certificate[] trustedRootCertificates,
long clockToleranceSec)
Create a
SamlToken object from DOM Element, performing
syntactic and semantical validation of the XML tree. |
SamlToken |
parseToken(String tokenXml)
Create a
SamlToken object from string representation, performing
syntactic and semantical validation of the XML tree. |
SamlToken |
parseToken(String tokenXml,
X509Certificate... trustedRootCertificates)
Create a
SamlToken object from string representation. |
SamlToken |
parseToken(String tokenXml,
X509Certificate[] trustedRootCertificates,
long clockToleranceSec)
Create a
SamlToken object from string representation, performing
syntactic and semantical validation of the XML tree. |
SamlToken parseToken(Element tokenRoot, X509Certificate[] trustedRootCertificates, long clockToleranceSec) throws InvalidTokenException
SamlToken object from DOM Element, performing
syntactic and semantical validation of the XML tree.
The token will retain a copy of the original element (not the element itself).
tokenRoot - The root element of the subtree containing the SAML token.trustedRootCertificates - The public signing certificate(s) of the security token service,
needed for token validation. Must not be null, there
must be at least one certificate, and none of the supplied
certificates may be null.clockToleranceSec - Tolerate that many seconds of discrepancy between the token's
sender clock and the local system clock when validating the
token's start and expiration time. This effectively "expands"
the token's validity period with the given number of seconds.InvalidTokenException - Indicates syntactic (e.g. contains invalid elements or missing
required elements) or semantic (e.g. subject name in unknown
format) error, expired or not yet valid token or failure to
validate the signature against the trustedRootCertificates.SamlToken parseToken(Element tokenRoot, X509Certificate... trustedRootCertificates) throws InvalidTokenException
SamlToken object from DOM Element.
This is a convenience overload of
parseToken(Element, X509Certificate[], long) with clockTolerance
= 0.
InvalidTokenExceptionSamlToken parseToken(Element tokenRoot) throws InvalidTokenException
SamlToken object from DOM Element, performing
syntactic and semantical validation of the XML tree.
The token signature and expiration status are not validated.
The token will retain a copy of the original element (not the element itself).
tokenRoot - The root element of the subtree containing the SAML token.InvalidTokenException - Indicates syntactic (e.g. contains invalid elements or missing
required elements) or semantic (e.g. subject name in unknown
format) error.SamlToken parseToken(String tokenXml, X509Certificate[] trustedRootCertificates, long clockToleranceSec) throws InvalidTokenException
SamlToken object from string representation, performing
syntactic and semantical validation of the XML tree.tokenXml - The xml representation of a SAML token. Not null.trustedRootCertificates - The public signing certificate(s) of the security token service,
needed for token validation. Must not be null, there
must be at least one certificate, and none of the supplied
certificates may be null.clockToleranceSec - Tolerate that many seconds of discrepancy between the token's
sender clock and the local system clock when validating the
token's start and expiration time. This effectively "expands"
the token's validity period with the given number of seconds.InvalidTokenException - Indicates syntactic (e.g. contains invalid elements or missing
required elements) or semantic (e.g. subject name in unknown
format) error, expired or not yet valid token or failure to
validate the signature against the trustedRootCertificates.SamlToken parseToken(String tokenXml, X509Certificate... trustedRootCertificates) throws InvalidTokenException
SamlToken object from string representation.
This is a convenience overload of
parseToken(String, X509Certificate[], long) with clockTolerance
= 0.
InvalidTokenExceptionSamlToken parseToken(String tokenXml) throws InvalidTokenException
SamlToken object from string representation, performing
syntactic and semantical validation of the XML tree.
The token signature and expiration status are not validated.
tokenXml - The xml representation of a SAML token. Not null.InvalidTokenException - Indicates syntactic (e.g. contains invalid elements or missing
required elements) or semantic (e.g. subject name in unknown
format) error.Copyright © 2016. All rights reserved.