public abstract class AbstractInboundSecurityToken extends AbstractSecurityToken implements InboundSecurityToken
keyTable, tokenUsages
Constructor and Description |
---|
AbstractInboundSecurityToken(InboundSecurityContext inboundSecurityContext,
String id,
SecurityTokenConstants.KeyIdentifier keyIdentifier,
boolean includedInMessage) |
Modifier and Type | Method and Description |
---|---|
void |
addTokenUsage(SecurityTokenConstants.TokenUsage tokenUsage) |
void |
addWrappedToken(InboundSecurityToken inboundSecurityToken) |
List<QName> |
getElementPath()
Returns the absolute path to the XMLElement
|
protected Key |
getKey(String algorithmURI,
XMLSecurityConstants.AlgorithmUsage algorithmUsage,
String correlationID) |
SecurityTokenConstants.KeyIdentifier |
getKeyIdentifier()
Returns the KeyIdentifier
|
InboundSecurityToken |
getKeyWrappingToken()
Returns the key wrapping token
|
protected PublicKey |
getPubKey(String algorithmURI,
XMLSecurityConstants.AlgorithmUsage algorithmUsage,
String correlationID) |
PublicKey |
getPublicKey(String algorithmURI,
XMLSecurityConstants.AlgorithmUsage algorithmUsage,
String correlationID)
Returns the public key if one exist for this token type
|
Key |
getSecretKey(String algorithmURI,
XMLSecurityConstants.AlgorithmUsage algorithmUsage,
String correlationID)
Returns the secret key
|
List<InboundSecurityToken> |
getWrappedTokens() |
XMLSecEvent |
getXMLSecEvent()
Returns the first XMLEvent for this token
|
boolean |
isIncludedInMessage()
Returns if the token is included in the message or not
|
void |
setElementPath(List<QName> elementPath) |
void |
setKeyWrappingToken(InboundSecurityToken keyWrappingToken) |
void |
setXMLSecEvent(XMLSecEvent xmlSecEvent) |
void |
verify()
Verifies the key if applicable
|
getId, getPublicKey, getSecretKey, getSha1Identifier, getTokenUsages, getX509Certificates, isAsymmetric, setAsymmetric, setPublicKey, setSecretKey, setSha1Identifier, setX509Certificates
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId, getPublicKey, getSecretKey, getSha1Identifier, getTokenType, getTokenUsages, getX509Certificates, isAsymmetric
public AbstractInboundSecurityToken(InboundSecurityContext inboundSecurityContext, String id, SecurityTokenConstants.KeyIdentifier keyIdentifier, boolean includedInMessage)
public SecurityTokenConstants.KeyIdentifier getKeyIdentifier()
SecurityToken
getKeyIdentifier
in interface SecurityToken
public List<QName> getElementPath()
InboundSecurityToken
getElementPath
in interface InboundSecurityToken
public XMLSecEvent getXMLSecEvent()
InboundSecurityToken
getXMLSecEvent
in interface InboundSecurityToken
public void setXMLSecEvent(XMLSecEvent xmlSecEvent)
protected Key getKey(String algorithmURI, XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID) throws XMLSecurityException
XMLSecurityException
public final Key getSecretKey(String algorithmURI, XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID) throws XMLSecurityException
InboundSecurityToken
getSecretKey
in interface InboundSecurityToken
algorithmURI
- for the requested keyXMLSecurityException
- if the key can't be loadedprotected PublicKey getPubKey(String algorithmURI, XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID) throws XMLSecurityException
XMLSecurityException
public final PublicKey getPublicKey(String algorithmURI, XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID) throws XMLSecurityException
InboundSecurityToken
getPublicKey
in interface InboundSecurityToken
XMLSecurityException
- if the key can't be loadedpublic void verify() throws XMLSecurityException
InboundSecurityToken
verify
in interface InboundSecurityToken
XMLSecurityException
- if the key couldn't be verified or the key isn't validpublic List<InboundSecurityToken> getWrappedTokens()
getWrappedTokens
in interface SecurityToken
public void addWrappedToken(InboundSecurityToken inboundSecurityToken)
addWrappedToken
in interface InboundSecurityToken
public void addTokenUsage(SecurityTokenConstants.TokenUsage tokenUsage) throws XMLSecurityException
addTokenUsage
in interface SecurityToken
addTokenUsage
in class AbstractSecurityToken
XMLSecurityException
public InboundSecurityToken getKeyWrappingToken() throws XMLSecurityException
SecurityToken
getKeyWrappingToken
in interface SecurityToken
XMLSecurityException
public void setKeyWrappingToken(InboundSecurityToken keyWrappingToken)
public boolean isIncludedInMessage()
InboundSecurityToken
isIncludedInMessage
in interface InboundSecurityToken
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.