Apache CXF API

org.apache.cxf.ws.security.tokenstore
Class SecurityToken

java.lang.Object
  extended by org.apache.cxf.ws.security.tokenstore.SecurityToken
All Implemented Interfaces:
Serializable

public class SecurityToken
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static String BOOTSTRAP_TOKEN_ID
          This tag holds an ID of a Bootstrap SecurityToken stored in the TokenStore
 
Constructor Summary
SecurityToken()
           
SecurityToken(String id)
           
SecurityToken(String id, Date created, Date expires)
           
SecurityToken(String id, Element tokenElem, Date created, Date expires)
           
SecurityToken(String id, Element tokenElem, Element lifetimeElem)
           
 
Method Summary
 Element getAttachedReference()
           
 Date getCreated()
           
 org.apache.wss4j.common.crypto.Crypto getCrypto()
           
 byte[] getData()
           
 Date getExpires()
           
 String getId()
           
static String getIdFromSTR(Element str)
           
 String getIssuerAddress()
           
 Key getKey()
           
 Principal getPrincipal()
          Get the principal associated with this SecurityToken
 Properties getProperties()
           
 byte[] getSecret()
           
 SecurityContext getSecurityContext()
          Get the SecurityContext associated with this SecurityToken
 String getSHA1()
           
 Element getToken()
           
 int getTokenHash()
          Get a hash code associated with this token.
 String getTokenType()
           
 String getTransformedTokenIdentifier()
          Get the identifier corresponding to a transformed version of this token
 Element getUnattachedReference()
           
 String getWsuId()
           
 X509Certificate getX509Certificate()
           
 boolean isExpired()
          Return whether this SecurityToken is expired or not
 void setAttachedReference(Element attachedReference)
           
 void setData(byte[] data)
           
 void setExpires(Date expires)
           
 void setId(String id)
          Set the id
 void setIssuerAddress(String issuerAddress)
           
 void setKey(Key key)
           
 void setPrincipal(Principal principal)
          Set the principal associated with this SecurityToken
 void setProperties(Properties properties)
           
 void setSecret(byte[] secret)
           
 void setSecurityContext(SecurityContext securityContext)
          Set the SecurityContext associated with this SecurityToken
 void setSHA1(String sha)
           
 void setToken(Element token)
           
 void setTokenHash(int hash)
          Set a hash code associated with this token.
 void setTokenType(String s)
           
 void setTransformedTokenIdentifier(String transformedTokenIdentifier)
          Set the identifier corresponding to a transformed version of this token
 void setUnattachedReference(Element unattachedReference)
           
 void setWsuId(String wsuId)
           
 void setX509Certificate(X509Certificate cert, org.apache.wss4j.common.crypto.Crypto cpt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOTSTRAP_TOKEN_ID

public static final String BOOTSTRAP_TOKEN_ID
This tag holds an ID of a Bootstrap SecurityToken stored in the TokenStore

See Also:
Constant Field Values
Constructor Detail

SecurityToken

public SecurityToken()

SecurityToken

public SecurityToken(String id)

SecurityToken

public SecurityToken(String id,
                     Date created,
                     Date expires)

SecurityToken

public SecurityToken(String id,
                     Element tokenElem,
                     Date created,
                     Date expires)

SecurityToken

public SecurityToken(String id,
                     Element tokenElem,
                     Element lifetimeElem)
Method Detail

getProperties

public Properties getProperties()
Returns:
Returns the properties.

setProperties

public void setProperties(Properties properties)
Parameters:
properties - The properties to set.

getToken

public Element getToken()
Returns:
Returns the token.

setToken

public void setToken(Element token)
Parameters:
token - The token to set.

getTransformedTokenIdentifier

public String getTransformedTokenIdentifier()
Get the identifier corresponding to a transformed version of this token


setTransformedTokenIdentifier

public void setTransformedTokenIdentifier(String transformedTokenIdentifier)
Set the identifier corresponding to a transformed version of this token


setId

public void setId(String id)
Set the id


getId

public String getId()
Returns:
Returns the id.

getSecret

public byte[] getSecret()
Returns:
Returns the secret.

setSecret

public void setSecret(byte[] secret)
Parameters:
secret - The secret to set.

getAttachedReference

public Element getAttachedReference()
Returns:
Returns the attachedReference.

setAttachedReference

public void setAttachedReference(Element attachedReference)
Parameters:
attachedReference - The attachedReference to set.

getUnattachedReference

public Element getUnattachedReference()
Returns:
Returns the unattachedReference.

setUnattachedReference

public void setUnattachedReference(Element unattachedReference)
Parameters:
unattachedReference - The unattachedReference to set.

getCreated

public Date getCreated()
Returns:
Returns the created.

getExpires

public Date getExpires()
Returns:
Returns the expires.

isExpired

public boolean isExpired()
Return whether this SecurityToken is expired or not


setExpires

public void setExpires(Date expires)
Parameters:
expires - The expires to set.

getIssuerAddress

public String getIssuerAddress()

setIssuerAddress

public void setIssuerAddress(String issuerAddress)

setSHA1

public void setSHA1(String sha)
Parameters:
sha - SHA1 of the encrypted key

getSHA1

public String getSHA1()
Returns:
SHA1 value of the encrypted key

getTokenType

public String getTokenType()

setTokenType

public void setTokenType(String s)

setWsuId

public void setWsuId(String wsuId)

getWsuId

public String getWsuId()

getIdFromSTR

public static String getIdFromSTR(Element str)

setX509Certificate

public void setX509Certificate(X509Certificate cert,
                               org.apache.wss4j.common.crypto.Crypto cpt)

getX509Certificate

public X509Certificate getX509Certificate()

getCrypto

public org.apache.wss4j.common.crypto.Crypto getCrypto()

setTokenHash

public void setTokenHash(int hash)
Set a hash code associated with this token.

Parameters:
hash - a hash code associated with this token

getTokenHash

public int getTokenHash()
Get a hash code associated with this token.

Returns:
a hash code associated with this token.

setPrincipal

public void setPrincipal(Principal principal)
Set the principal associated with this SecurityToken

Parameters:
principal - the principal associated with this SecurityToken

getPrincipal

public Principal getPrincipal()
Get the principal associated with this SecurityToken

Returns:
the principal associated with this SecurityToken

setSecurityContext

public void setSecurityContext(SecurityContext securityContext)
Set the SecurityContext associated with this SecurityToken

Parameters:
securityContext - the SecurityContext associated with this SecurityToken

getSecurityContext

public SecurityContext getSecurityContext()
Get the SecurityContext associated with this SecurityToken

Returns:
the SecurityContext associated with this SecurityToken

getKey

public Key getKey()

setKey

public void setKey(Key key)

getData

public byte[] getData()

setData

public void setData(byte[] data)

Apache CXF API

Apache CXF