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
  • Constructor Details

  • Method Details

    • isAsymmetric

      public boolean isAsymmetric() throws org.apache.xml.security.exceptions.XMLSecurityException
      Specified by:
      isAsymmetric in interface org.apache.xml.security.stax.securityToken.SecurityToken
      Overrides:
      isAsymmetric in class org.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:
      getKey in class org.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:
      getTokenType in interface org.apache.xml.security.stax.securityToken.SecurityToken
    • generateDerivedKey

      public byte[] generateDerivedKey() throws org.apache.wss4j.common.ext.WSSecurityException
      This method generates a derived key as defined in WSS Username Token Profile.
      Specified by:
      generateDerivedKey in interface UsernameSecurityToken
      Returns:
      Returns the derived key a byte array
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException
    • generateDerivedKey

      protected byte[] generateDerivedKey(WSInboundSecurityContext wsInboundSecurityContext) throws org.apache.wss4j.common.ext.WSSecurityException
      This method generates a derived key as defined in WSS Username Token Profile.
      Returns:
      Returns the derived key a byte array
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException
    • getPrincipal

      public Principal getPrincipal() throws org.apache.wss4j.common.ext.WSSecurityException
      Specified by:
      getPrincipal in interface SubjectAndPrincipalSecurityToken
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException
    • getUsernameTokenPasswordType

      public WSSConstants.UsernameTokenPasswordType getUsernameTokenPasswordType()
      Specified by:
      getUsernameTokenPasswordType in interface UsernameSecurityToken
    • getCreatedTime

      public String getCreatedTime()
      Specified by:
      getCreatedTime in interface UsernameSecurityToken
    • getPassword

      public String getPassword()
      Specified by:
      getPassword in interface UsernameSecurityToken
    • getUsername

      public String getUsername()
      Specified by:
      getUsername in interface UsernameSecurityToken
    • getNonce

      public byte[] getNonce()
      Specified by:
      getNonce in interface UsernameSecurityToken
    • getSalt

      public byte[] getSalt()
      Specified by:
      getSalt in interface UsernameSecurityToken
    • getIteration

      public Long getIteration()
      Specified by:
      getIteration in interface UsernameSecurityToken
    • setSubject

      public void setSubject(Subject subject)
    • getSubject

      public Subject getSubject() throws org.apache.wss4j.common.ext.WSSecurityException
      Specified by:
      getSubject in interface SubjectAndPrincipalSecurityToken
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException