Class X509SecurityTokenImpl
java.lang.Object
org.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken
org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken
org.apache.xml.security.stax.impl.securityToken.X509SecurityToken
org.apache.wss4j.stax.impl.securityToken.X509SecurityTokenImpl
- All Implemented Interfaces:
SubjectAndPrincipalSecurityToken,X509SecurityToken,org.apache.xml.security.stax.securityToken.InboundSecurityToken,org.apache.xml.security.stax.securityToken.SecurityToken
- Direct Known Subclasses:
X509DefaultSecurityTokenImpl,X509IssuerSerialTokenImpl,X509PKIPathv1SecurityTokenImpl,X509SKISecurityTokenImpl,X509ThumbprintSHA1SecurityTokenImpl,X509V3SecurityTokenImpl
public abstract class X509SecurityTokenImpl
extends org.apache.xml.security.stax.impl.securityToken.X509SecurityToken
implements X509SecurityToken
-
Field Summary
Fields inherited from class org.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken
keyTable, tokenUsages -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedX509SecurityTokenImpl(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType, WSInboundSecurityContext wsInboundSecurityContext, Crypto crypto, CallbackHandler callbackHandler, String id, org.apache.xml.security.stax.securityToken.SecurityTokenConstants.KeyIdentifier keyIdentifier, WSSSecurityProperties securityProperties, boolean includedInMessage) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringgetAlias()protected CryptogetKey(String algorithmURI, org.apache.xml.security.stax.ext.XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID) org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenTypeprotected booleanmatches(X509Certificate cert, Collection<Pattern> subjectDNPatterns) protected voidvoidverify()Methods inherited from class org.apache.xml.security.stax.impl.securityToken.X509SecurityToken
isAsymmetricMethods inherited from class org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken
addTokenUsage, addWrappedToken, getElementPath, getKeyIdentifier, getKeyWrappingToken, getPubKey, getPublicKey, getSecretKey, getWrappedTokens, getXMLSecEvent, isIncludedInMessage, setElementPath, setKeyWrappingToken, setXMLSecEventMethods inherited from class org.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken
getId, getPublicKey, getSecretKey, getSha1Identifier, getTokenUsages, setAsymmetric, setPublicKey, setSecretKey, setSha1Identifier, setX509CertificatesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.xml.security.stax.securityToken.SecurityToken
addTokenUsage, getId, getKeyIdentifier, getKeyWrappingToken, getPublicKey, getSecretKey, getSha1Identifier, getTokenUsages, getWrappedTokens, isAsymmetric
-
Constructor Details
-
X509SecurityTokenImpl
protected X509SecurityTokenImpl(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType, WSInboundSecurityContext wsInboundSecurityContext, Crypto crypto, CallbackHandler callbackHandler, String id, org.apache.xml.security.stax.securityToken.SecurityTokenConstants.KeyIdentifier keyIdentifier, WSSSecurityProperties securityProperties, boolean includedInMessage)
-
-
Method Details
-
getCrypto
-
setCrypto
-
getCallbackHandler
-
getKey
public Key getKey(String algorithmURI, org.apache.xml.security.stax.ext.XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID) throws org.apache.xml.security.exceptions.XMLSecurityException - Overrides:
getKeyin classorg.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken- Throws:
org.apache.xml.security.exceptions.XMLSecurityException
-
getX509Certificates
public X509Certificate[] getX509Certificates() throws org.apache.xml.security.exceptions.XMLSecurityException- Specified by:
getX509Certificatesin interfaceorg.apache.xml.security.stax.securityToken.SecurityToken- Overrides:
getX509Certificatesin classorg.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken- Throws:
org.apache.xml.security.exceptions.XMLSecurityException
-
verify
public void verify() throws org.apache.xml.security.exceptions.XMLSecurityException- Specified by:
verifyin interfaceorg.apache.xml.security.stax.securityToken.InboundSecurityToken- Overrides:
verifyin classorg.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken- Throws:
org.apache.xml.security.exceptions.XMLSecurityException
-
matches
- Returns:
- true if the certificate's SubjectDN matches the constraints defined in the subject DNConstraints; false, otherwise. The certificate subject DN only has to match ONE of the subject cert constraints (not all).
-
getAlias
- Throws:
org.apache.xml.security.exceptions.XMLSecurityException
-
getSubject
- Specified by:
getSubjectin interfaceSubjectAndPrincipalSecurityToken- Throws:
WSSecurityException
-
getPrincipal
- Specified by:
getPrincipalin interfaceSubjectAndPrincipalSecurityToken- Throws:
WSSecurityException
-
getTokenType
public org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType getTokenType()- Specified by:
getTokenTypein interfaceorg.apache.xml.security.stax.securityToken.SecurityToken- Overrides:
getTokenTypein classorg.apache.xml.security.stax.impl.securityToken.X509SecurityToken
-