SecurityTokenAbstractInboundSecurityToken, GenericOutboundSecurityTokenpublic abstract class AbstractSecurityToken extends Object implements SecurityToken
| Modifier and Type | Field | Description |
|---|---|---|
protected Map<String,Key> |
keyTable |
|
protected List<SecurityTokenConstants.TokenUsage> |
tokenUsages |
| Constructor | Description |
|---|---|
AbstractSecurityToken(String id) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addTokenUsage(SecurityTokenConstants.TokenUsage tokenUsage) |
|
String |
getId() |
Returns the token id aka wsu:Id
|
PublicKey |
getPublicKey() |
Returns the public key if one exists and already initialized, null otherwise
|
Map<String,Key> |
getSecretKey() |
Returns the secret key's if already initialized, null otherwise
|
String |
getSha1Identifier() |
Returns a SHA-1 Identifier that refers to this token
|
List<SecurityTokenConstants.TokenUsage> |
getTokenUsages() |
|
X509Certificate[] |
getX509Certificates() |
Returns the certificate chain if one exists for this token type
|
boolean |
isAsymmetric() |
Returns the token type
|
protected void |
setAsymmetric(boolean asymmetric) |
|
void |
setPublicKey(PublicKey publicKey) |
|
void |
setSecretKey(String algorithmURI,
Key key) |
|
void |
setSha1Identifier(String sha1Identifier) |
|
void |
setX509Certificates(X509Certificate[] x509Certificates) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetKeyIdentifier, getKeyWrappingToken, getTokenType, getWrappedTokensprotected final List<SecurityTokenConstants.TokenUsage> tokenUsages
public AbstractSecurityToken(String id)
public String getId()
SecurityTokengetId in interface SecurityTokenprotected void setAsymmetric(boolean asymmetric)
public boolean isAsymmetric()
throws XMLSecurityException
SecurityTokenisAsymmetric in interface SecurityTokenXMLSecurityExceptionpublic Map<String,Key> getSecretKey() throws XMLSecurityException
SecurityTokengetSecretKey in interface SecurityTokenXMLSecurityExceptionpublic void setPublicKey(PublicKey publicKey)
public PublicKey getPublicKey() throws XMLSecurityException
SecurityTokengetPublicKey in interface SecurityTokenXMLSecurityExceptionpublic void setX509Certificates(X509Certificate[] x509Certificates)
public X509Certificate[] getX509Certificates() throws XMLSecurityException
SecurityTokengetX509Certificates in interface SecurityTokenXMLSecurityException - if the certificates can't be retrievedpublic void addTokenUsage(SecurityTokenConstants.TokenUsage tokenUsage) throws XMLSecurityException
addTokenUsage in interface SecurityTokenXMLSecurityExceptionpublic List<SecurityTokenConstants.TokenUsage> getTokenUsages()
getTokenUsages in interface SecurityTokenpublic String getSha1Identifier()
SecurityTokengetSha1Identifier in interface SecurityTokenpublic void setSha1Identifier(String sha1Identifier)
Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.