Class SecurityToken
java.lang.Object
org.apache.cxf.ws.security.tokenstore.SecurityToken
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThis tag holds an ID of a Bootstrap SecurityToken stored in the TokenStore -
Constructor Summary
ConstructorsConstructorDescriptionSecurityToken(String id) SecurityToken(String id, Instant created, Instant expires) SecurityToken(String id, Element tokenElem, Instant created, Instant expires) SecurityToken(String id, Element tokenElem, Element lifetimeElem) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.wss4j.common.crypto.CryptogetId()static StringgetIdFromSTR(Element str) getKey()Get the principal associated with this SecurityTokenbyte[]org.apache.cxf.security.SecurityContextGet the SecurityContext associated with this SecurityTokengetSHA1()getToken()intGet a hash code associated with this token.Get the identifier corresponding to a transformed version of this tokengetWsuId()booleanisAboutToExpire(long secondsToExpiry) Return whether this SecurityToken is about to expire or notbooleanReturn whether this SecurityToken is expired or notvoidsetAttachedReference(Element attachedReference) voidsetExpires(Instant expires) voidSet the idvoidsetIssuerAddress(String issuerAddress) voidvoidsetPrincipal(Principal principal) Set the principal associated with this SecurityTokenvoidsetProperties(Map<String, Object> properties) voidsetSecret(byte[] secret) voidsetSecurityContext(org.apache.cxf.security.SecurityContext securityContext) Set the SecurityContext associated with this SecurityTokenvoidvoidvoidsetTokenHash(int hash) Set a hash code associated with this token.voidvoidsetTransformedTokenIdentifier(String transformedTokenIdentifier) Set the identifier corresponding to a transformed version of this tokenvoidsetUnattachedReference(Element unattachedReference) voidvoidsetX509Certificate(X509Certificate cert, org.apache.wss4j.common.crypto.Crypto cpt)
-
Field Details
-
BOOTSTRAP_TOKEN_ID
This tag holds an ID of a Bootstrap SecurityToken stored in the TokenStore- See Also:
-
-
Constructor Details
-
SecurityToken
public SecurityToken() -
SecurityToken
-
SecurityToken
-
SecurityToken
-
SecurityToken
-
-
Method Details
-
getProperties
- Returns:
- Returns the properties.
-
setProperties
- Parameters:
properties- The properties to set.
-
getToken
- Returns:
- Returns the token.
-
setToken
- Parameters:
token- The token to set.
-
getTransformedTokenIdentifier
Get the identifier corresponding to a transformed version of this token -
setTransformedTokenIdentifier
Set the identifier corresponding to a transformed version of this token -
setId
Set the id -
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
- Returns:
- Returns the attachedReference.
-
setAttachedReference
- Parameters:
attachedReference- The attachedReference to set.
-
getUnattachedReference
- Returns:
- Returns the unattachedReference.
-
setUnattachedReference
- Parameters:
unattachedReference- The unattachedReference to set.
-
getCreated
- Returns:
- Returns the created.
-
getExpires
- Returns:
- Returns the expires.
-
isExpired
public boolean isExpired()Return whether this SecurityToken is expired or not -
isAboutToExpire
public boolean isAboutToExpire(long secondsToExpiry) Return whether this SecurityToken is about to expire or not -
setExpires
- Parameters:
expires- The expires to set.
-
getIssuerAddress
-
setIssuerAddress
-
setSHA1
- Parameters:
sha- SHA1 of the encrypted key
-
getSHA1
- Returns:
- SHA1 value of the encrypted key
-
getTokenType
-
setTokenType
-
setWsuId
-
getWsuId
-
getIdFromSTR
-
setX509Certificate
-
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
Set the principal associated with this SecurityToken- Parameters:
principal- the principal associated with this SecurityToken
-
getPrincipal
Get the principal associated with this SecurityToken- Returns:
- the principal associated with this SecurityToken
-
setSecurityContext
public void setSecurityContext(org.apache.cxf.security.SecurityContext securityContext) Set the SecurityContext associated with this SecurityToken- Parameters:
securityContext- the SecurityContext associated with this SecurityToken
-
getSecurityContext
public org.apache.cxf.security.SecurityContext getSecurityContext()Get the SecurityContext associated with this SecurityToken- Returns:
- the SecurityContext associated with this SecurityToken
-
getKey
-
setKey
-