Class SAML11RequestedSecurityToken
- java.lang.Object
-
- com.sun.identity.wsfederation.profile.SAML11RequestedSecurityToken
-
- All Implemented Interfaces:
RequestedSecurityToken
public class SAML11RequestedSecurityToken extends Object implements RequestedSecurityToken
SAML11RequestedSecurityToken represents a concrete RequestedSecurityToken - one containing a SAML 1.1 assertion.
-
-
Constructor Summary
Constructors Constructor Description SAML11RequestedSecurityToken(String realm, String spTokenIssuerName, String idpEntityId, int notBeforeSkew, int effectiveTime, String certAlias, String authMethod, Date authInstant, NameIdentifier ni, List attributes)
Creates a SAML11RequestedSecurityToken.SAML11RequestedSecurityToken(Node token)
Creates a SAML11RequestedSecurityToken given a DOM Node
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Assertion
getAssertion()
List
getAttributes()
String
getIssuer()
String
getTokenId()
String
toString()
This method marshalls the token, returning a String comprising the textual XML representation.Map<String,Object>
verifyToken(String realm, String hostEntityId, int timeskew)
Verifies the token's validity, checking the signature, validity period etc.
-
-
-
Constructor Detail
-
SAML11RequestedSecurityToken
public SAML11RequestedSecurityToken(Node token) throws WSFederationException
Creates a SAML11RequestedSecurityToken given a DOM Node- Parameters:
token
- a DOM Node representing a RequestedSecurityToken- Throws:
WSFederationException
-
SAML11RequestedSecurityToken
public SAML11RequestedSecurityToken(String realm, String spTokenIssuerName, String idpEntityId, int notBeforeSkew, int effectiveTime, String certAlias, String authMethod, Date authInstant, NameIdentifier ni, List attributes) throws WSFederationException
Creates a SAML11RequestedSecurityToken.- Parameters:
realm
- the realm of the entities.spTokenIssuerName
- The name of the SP Token Issuer.idpEntityId
- identity provifer entity ID - issuer of the token.notBeforeSkew
- number of seconds to subtract from current time to form Assertion notBefore time.effectiveTime
- length of time, in seconds, from Assertion's notBefore time to its notOnOrAfter time.certAlias
- alias of the signing certificate. null means do not sign the assertionauthMethod
- mechanism by which the subject authenticated to the identity providerauthInstant
- time at which the subject authenticated to the identity providerni
- SAML 1.1 NameIdentitifer for the subjectattributes
- List of com.sun.identity.saml.assertion.Attribute to include in the Assertion- Throws:
WSFederationException
- in case of error.
-
-
Method Detail
-
getTokenId
public String getTokenId()
- Specified by:
getTokenId
in interfaceRequestedSecurityToken
- Returns:
- the unique identifier of the RequestedSecurityToken. Maps to the SAML 1.1 Assertion's AssertionID
-
getIssuer
public String getIssuer()
- Specified by:
getIssuer
in interfaceRequestedSecurityToken
- Returns:
- the issuer of the RequestedSecurityToken.
-
getAttributes
public List getAttributes()
- Specified by:
getAttributes
in interfaceRequestedSecurityToken
- Returns:
- a list of attributes of type
com.sun.identity.saml.assertion.Attribute
-
getAssertion
public Assertion getAssertion()
- Returns:
- the underlying SAML 1.1 Assertion
-
toString
public String toString()
This method marshalls the token, returning a String comprising the textual XML representation.
-
verifyToken
public Map<String,Object> verifyToken(String realm, String hostEntityId, int timeskew) throws WSFederationException
Verifies the token's validity, checking the signature, validity period etc.- Specified by:
verifyToken
in interfaceRequestedSecurityToken
- Parameters:
realm
- the realm of the local entityhostEntityId
- the local entity IDtimeskew
- permitted skew between service provider and identity provider clocks, in seconds- Returns:
- a Map of relevant data including Subject and the List of Assertions.
- Throws:
WSFederationException
- in case of any error - invalid token signature, token expired etc.
-
-