Class UsernameSecurityTokenImpl
java.lang.Object
org.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken
org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken
org.apache.wss4j.stax.impl.securityToken.UsernameSecurityTokenImpl
- All Implemented Interfaces:
SubjectAndPrincipalSecurityToken,UsernameSecurityToken,org.apache.xml.security.stax.securityToken.InboundSecurityToken,org.apache.xml.security.stax.securityToken.SecurityToken
public class UsernameSecurityTokenImpl
extends org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken
implements UsernameSecurityToken
-
Field Summary
Fields inherited from class org.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken
keyTable, tokenUsages -
Constructor Summary
ConstructorsConstructorDescriptionUsernameSecurityTokenImpl(WSSConstants.UsernameTokenPasswordType usernameTokenPasswordType, String username, String password, String createdTime, byte[] nonce, byte[] salt, Long iteration, WSInboundSecurityContext wsInboundSecurityContext, String id, org.apache.xml.security.stax.securityToken.SecurityTokenConstants.KeyIdentifier keyIdentifier) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]This method generates a derived key as defined in WSS Username Token Profile.protected byte[]generateDerivedKey(WSInboundSecurityContext wsInboundSecurityContext) This method generates a derived key as defined in WSS Username Token Profile.protected KeygetKey(String algorithmURI, org.apache.xml.security.stax.ext.XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID) byte[]getNonce()byte[]getSalt()org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenTypebooleanvoidsetSubject(Subject subject) Methods inherited from class org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken
addTokenUsage, addWrappedToken, getElementPath, getKeyIdentifier, getKeyWrappingToken, getPubKey, getPublicKey, getSecretKey, getWrappedTokens, getXMLSecEvent, isIncludedInMessage, setElementPath, setKeyWrappingToken, setXMLSecEvent, verifyMethods inherited from class org.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken
getId, getPublicKey, getSecretKey, getSha1Identifier, getTokenUsages, getX509Certificates, 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, getX509Certificates
-
Constructor Details
-
UsernameSecurityTokenImpl
public UsernameSecurityTokenImpl(WSSConstants.UsernameTokenPasswordType usernameTokenPasswordType, String username, String password, String createdTime, byte[] nonce, byte[] salt, Long iteration, WSInboundSecurityContext wsInboundSecurityContext, String id, org.apache.xml.security.stax.securityToken.SecurityTokenConstants.KeyIdentifier keyIdentifier)
-
-
Method Details
-
isAsymmetric
public boolean isAsymmetric() throws org.apache.xml.security.exceptions.XMLSecurityException- Specified by:
isAsymmetricin interfaceorg.apache.xml.security.stax.securityToken.SecurityToken- Overrides:
isAsymmetricin classorg.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken- Throws:
org.apache.xml.security.exceptions.XMLSecurityException
-
getKey
protected 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
-
getTokenType
public org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType getTokenType()- Specified by:
getTokenTypein interfaceorg.apache.xml.security.stax.securityToken.SecurityToken
-
generateDerivedKey
This method generates a derived key as defined in WSS Username Token Profile.- Specified by:
generateDerivedKeyin interfaceUsernameSecurityToken- Returns:
- Returns the derived key a byte array
- Throws:
WSSecurityException
-
generateDerivedKey
protected byte[] generateDerivedKey(WSInboundSecurityContext wsInboundSecurityContext) throws WSSecurityException This method generates a derived key as defined in WSS Username Token Profile.- Returns:
- Returns the derived key a byte array
- Throws:
WSSecurityException
-
getPrincipal
- Specified by:
getPrincipalin interfaceSubjectAndPrincipalSecurityToken- Throws:
WSSecurityException
-
getUsernameTokenPasswordType
- Specified by:
getUsernameTokenPasswordTypein interfaceUsernameSecurityToken
-
getCreatedTime
- Specified by:
getCreatedTimein interfaceUsernameSecurityToken
-
getPassword
- Specified by:
getPasswordin interfaceUsernameSecurityToken
-
getUsername
- Specified by:
getUsernamein interfaceUsernameSecurityToken
-
getNonce
public byte[] getNonce()- Specified by:
getNoncein interfaceUsernameSecurityToken
-
getSalt
public byte[] getSalt()- Specified by:
getSaltin interfaceUsernameSecurityToken
-
getIteration
- Specified by:
getIterationin interfaceUsernameSecurityToken
-
setSubject
-
getSubject
- Specified by:
getSubjectin interfaceSubjectAndPrincipalSecurityToken- Throws:
WSSecurityException
-