public class SecurityToken extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
BOOTSTRAP_TOKEN_ID
This tag holds an ID of a Bootstrap SecurityToken stored in the TokenStore
|
Constructor and Description |
---|
SecurityToken() |
SecurityToken(String id) |
SecurityToken(String id,
Element tokenElem,
Element lifetimeElem) |
SecurityToken(String id,
Element tokenElem,
Instant created,
Instant expires) |
SecurityToken(String id,
Instant created,
Instant expires) |
Modifier and Type | Method and Description |
---|---|
Element |
getAttachedReference() |
Instant |
getCreated() |
org.apache.wss4j.common.crypto.Crypto |
getCrypto() |
Instant |
getExpires() |
String |
getId() |
static String |
getIdFromSTR(Element str) |
String |
getIssuerAddress() |
Key |
getKey() |
Principal |
getPrincipal()
Get the principal associated with this SecurityToken
|
Map<String,Object> |
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 |
isAboutToExpire(long secondsToExpiry)
Return whether this SecurityToken is about to expire or not
|
boolean |
isExpired()
Return whether this SecurityToken is expired or not
|
void |
setAttachedReference(Element attachedReference) |
void |
setExpires(Instant 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(Map<String,Object> 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) |
public static final String BOOTSTRAP_TOKEN_ID
public SecurityToken()
public SecurityToken(String id)
public void setProperties(Map<String,Object> properties)
properties
- The properties to set.public Element getToken()
public void setToken(Element token)
token
- The token to set.public String getTransformedTokenIdentifier()
public void setTransformedTokenIdentifier(String transformedTokenIdentifier)
public void setId(String id)
public String getId()
public byte[] getSecret()
public void setSecret(byte[] secret)
secret
- The secret to set.public Element getAttachedReference()
public void setAttachedReference(Element attachedReference)
attachedReference
- The attachedReference to set.public Element getUnattachedReference()
public void setUnattachedReference(Element unattachedReference)
unattachedReference
- The unattachedReference to set.public Instant getCreated()
public Instant getExpires()
public boolean isExpired()
public boolean isAboutToExpire(long secondsToExpiry)
public void setExpires(Instant expires)
expires
- The expires to set.public String getIssuerAddress()
public void setIssuerAddress(String issuerAddress)
public void setSHA1(String sha)
sha
- SHA1 of the encrypted keypublic String getSHA1()
public String getTokenType()
public void setTokenType(String s)
public void setWsuId(String wsuId)
public String getWsuId()
public void setX509Certificate(X509Certificate cert, org.apache.wss4j.common.crypto.Crypto cpt)
public X509Certificate getX509Certificate()
public org.apache.wss4j.common.crypto.Crypto getCrypto()
public void setTokenHash(int hash)
hash
- a hash code associated with this tokenpublic int getTokenHash()
public void setPrincipal(Principal principal)
principal
- the principal associated with this SecurityTokenpublic Principal getPrincipal()
public void setSecurityContext(SecurityContext securityContext)
securityContext
- the SecurityContext associated with this SecurityTokenpublic SecurityContext getSecurityContext()
public Key getKey()
public void setKey(Key key)
Apache CXF