com.pingidentity.sts.clientapi.tokens.saml
Class SamlToken

java.lang.Object
  extended by com.pingidentity.sts.clientapi.tokens.saml.SamlToken
All Implemented Interfaces:
Token
Direct Known Subclasses:
EncryptedSaml20Token, Saml11Token, Saml20Token

public abstract class SamlToken
extends java.lang.Object
implements Token

Abstract class to represent a SAML security tokens


Constructor Summary
SamlToken()
          Creates a new instance of the SamlTokenBase
SamlToken(org.w3c.dom.Element element)
          Creates a new instance of the SamlTokenBase class using the specified root.
 
Method Summary
protected  void addAttributes(SamlAttribute attribute)
           
protected abstract  void doParse(org.w3c.dom.Element e)
          Loads an XML root into properties of the SecurityToken.
 java.util.List getAttributes()
           
 java.lang.String getAudience()
           
 java.util.Calendar getAuthenticationInstant()
           
 java.lang.String getId()
           
 java.util.Calendar getIssueInstant()
           
 java.lang.String getIssuer()
           
 java.lang.String getNameFormat()
           
 java.lang.String getNameIdentifier()
           
 java.lang.String getNameQualifier()
           
 java.util.Calendar getNotBefore()
           
 java.util.Calendar getNotOnOrAfter()
           
 org.w3c.dom.Element getRoot()
          Retrieves the content of a security token as an XML w3c Element
 java.lang.String getSubjectId()
          Retrieves the principal subject identfier of the token.
abstract  java.lang.String getTokenType()
          Gets the type of the security token.
 void parse(org.w3c.dom.Element element)
          Wraps an XML w3c Element as a secutity token
protected  void setAudience(java.lang.String audience)
           
protected  void setAuthenticationInstant(java.util.Calendar authenticationInstant)
           
protected  void setId(java.lang.String id)
           
protected  void setIssueInstant(java.util.Calendar issueInstant)
           
protected  void setIssuer(java.lang.String issuer)
           
 void setNameFormat(java.lang.String nameFormat)
           
protected  void setNameIdentifier(java.lang.String nameIdentifier)
           
protected  void setNameQualifier(java.lang.String nameQalifier)
           
protected  void setNotBefore(java.util.Calendar notBefore)
           
protected  void setNotOnOrAfter(java.util.Calendar notOnOrAfter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SamlToken

public SamlToken()
Creates a new instance of the SamlTokenBase


SamlToken

public SamlToken(org.w3c.dom.Element element)
          throws SecurityTokenException
Creates a new instance of the SamlTokenBase class using the specified root.

Parameters:
element - An root representing an SAML token.
Throws:
SecurityTokenException - if root can't be parsed
Method Detail

getAttributes

public java.util.List getAttributes()
Returns:
List of elements specifies an attribute of the subject.

addAttributes

protected void addAttributes(SamlAttribute attribute)

getAuthenticationInstant

public java.util.Calendar getAuthenticationInstant()
Returns:
The time at which the authentication took place.

setAuthenticationInstant

protected void setAuthenticationInstant(java.util.Calendar authenticationInstant)

getId

public java.lang.String getId()
Returns:
The identifier for this assertion.

setId

protected void setId(java.lang.String id)

getIssueInstant

public java.util.Calendar getIssueInstant()
Returns:
The time instant of issue.

setIssueInstant

protected void setIssueInstant(java.util.Calendar issueInstant)

getIssuer

public java.lang.String getIssuer()
Returns:
The SAML authority that created the assertion.

setIssuer

protected void setIssuer(java.lang.String issuer)

getNotBefore

public java.util.Calendar getNotBefore()
Returns:
The earliest time instant at which the assertion is valid.

setNotBefore

protected void setNotBefore(java.util.Calendar notBefore)

getNotOnOrAfter

public java.util.Calendar getNotOnOrAfter()
Returns:
The time instant at which the assertion has expired.

setNotOnOrAfter

protected void setNotOnOrAfter(java.util.Calendar notOnOrAfter)

getNameIdentifier

public java.lang.String getNameIdentifier()
Returns:
An identification of a subject by its name and security domain.

setNameIdentifier

protected void setNameIdentifier(java.lang.String nameIdentifier)

getNameQualifier

public java.lang.String getNameQualifier()
Returns:
The security or administrative domain that qualifies the name of the subject.

setNameQualifier

protected void setNameQualifier(java.lang.String nameQalifier)

getSubjectId

public java.lang.String getSubjectId()
Description copied from interface: Token
Retrieves the principal subject identfier of the token.

Specified by:
getSubjectId in interface Token
Returns:
subject as String

getRoot

public org.w3c.dom.Element getRoot()
Retrieves the content of a security token as an XML w3c Element

Specified by:
getRoot in interface Token
Returns:

parse

public void parse(org.w3c.dom.Element element)
           throws SecurityTokenException
Wraps an XML w3c Element as a secutity token

Specified by:
parse in interface Token
Throws:
SecurityTokenException

getTokenType

public abstract java.lang.String getTokenType()
Gets the type of the security token.


doParse

protected abstract void doParse(org.w3c.dom.Element e)
                         throws SecurityTokenException
Loads an XML root into properties of the SecurityToken.

Parameters:
e - An root representing an SAML token.
Throws:
SecurityTokenException

setNameFormat

public void setNameFormat(java.lang.String nameFormat)

getNameFormat

public java.lang.String getNameFormat()

getAudience

public java.lang.String getAudience()
Returns:
A URI reference that identifies an intended audience.

setAudience

protected void setAudience(java.lang.String audience)


Copyright © 2006-2009 Ping Identity Corporation. All Rights Reserved.