SecurityToken
AbstractInboundSecurityToken
, GenericOutboundSecurityToken
public 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, wait
getKeyIdentifier, getKeyWrappingToken, getTokenType, getWrappedTokens
protected final List<SecurityTokenConstants.TokenUsage> tokenUsages
public AbstractSecurityToken(String id)
public String getId()
SecurityToken
getId
in interface SecurityToken
protected void setAsymmetric(boolean asymmetric)
public boolean isAsymmetric() throws XMLSecurityException
SecurityToken
isAsymmetric
in interface SecurityToken
XMLSecurityException
public Map<String,Key> getSecretKey() throws XMLSecurityException
SecurityToken
getSecretKey
in interface SecurityToken
XMLSecurityException
public void setPublicKey(PublicKey publicKey)
public PublicKey getPublicKey() throws XMLSecurityException
SecurityToken
getPublicKey
in interface SecurityToken
XMLSecurityException
public void setX509Certificates(X509Certificate[] x509Certificates)
public X509Certificate[] getX509Certificates() throws XMLSecurityException
SecurityToken
getX509Certificates
in interface SecurityToken
XMLSecurityException
- if the certificates can't be retrievedpublic void addTokenUsage(SecurityTokenConstants.TokenUsage tokenUsage) throws XMLSecurityException
addTokenUsage
in interface SecurityToken
XMLSecurityException
public List<SecurityTokenConstants.TokenUsage> getTokenUsages()
getTokenUsages
in interface SecurityToken
public String getSha1Identifier()
SecurityToken
getSha1Identifier
in interface SecurityToken
public void setSha1Identifier(String sha1Identifier)
Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.