Class Credential

java.lang.Object
org.apache.wss4j.dom.validate.Credential

public class Credential extends Object
This class stores various Credential types that can be validated and/or returned by a Validator implementation. It also stores an optional Principal object which can provide context information to the validators.
  • Constructor Details

    • Credential

      public Credential()
  • Method Details

    • setSecurityContextToken

      public void setSecurityContextToken(SecurityContextToken securityContextToken)
      Set a SecurityContextToken to be validated
      Parameters:
      securityContextToken - a SecurityContextToken to be validated
    • getSecurityContextToken

      public SecurityContextToken getSecurityContextToken()
      Get a SecurityContextToken to be validated
      Returns:
      a SecurityContextToken to be validated
    • setSecretKey

      public void setSecretKey(byte[] secretKey)
      Set a SecretKey (byte[]) to be validated
      Parameters:
      secretKey - a SecretKey (byte) to be validated
    • getSecretKey

      public byte[] getSecretKey()
      Get a SecretKey (byte[]) to be validated
      Returns:
      a SecretKey (byte[]) to be validated
    • setPublicKey

      public void setPublicKey(PublicKey publicKey)
      Set a PublicKey to be validated
      Parameters:
      publicKey - a PublicKey to be validated
    • getPublicKey

      public PublicKey getPublicKey()
      Get a PublicKey to be validated
      Returns:
      a PublicKey to be validated
    • setCertificates

      public void setCertificates(X509Certificate[] certs)
      Set an X509Certificate chain to be validated
      Parameters:
      certs - an X509Certificate chain to be validated
    • getCertificates

      public X509Certificate[] getCertificates()
      Get an X509Certificate chain to be validated
      Returns:
      an X509Certificate chain to be validated
    • setTimestamp

      public void setTimestamp(Timestamp timestamp)
      Set a Timestamp to be validated
      Parameters:
      timestamp - a Timestamp to be validated
    • getTimestamp

      public Timestamp getTimestamp()
      Get a Timestamp to be validated
      Returns:
      a Timestamp to be validated
    • setUsernametoken

      public void setUsernametoken(UsernameToken usernametoken)
      Set a UsernameToken to be validated
      Parameters:
      usernametoken - a UsernameToken to be validated
    • getUsernametoken

      public UsernameToken getUsernametoken()
      Get a UsernameToken to be validated
      Returns:
      a UsernameToken to be validated
    • setBinarySecurityToken

      public void setBinarySecurityToken(BinarySecurity binarySecurityToken)
      Set the BinarySecurityToken to be validated
      Parameters:
      binarySecurityToken - the BinarySecurityToken to be validated
    • getBinarySecurityToken

      public BinarySecurity getBinarySecurityToken()
      Get the BinarySecurityToken to be validated
      Returns:
      the BinarySecurityToken to be validated
    • setSamlAssertion

      public void setSamlAssertion(SamlAssertionWrapper samlAssertion)
      Set an SamlAssertionWrapper to be validated
      Parameters:
      samlAssertion - an SamlAssertionWrapper to be validated
    • getSamlAssertion

      public SamlAssertionWrapper getSamlAssertion()
      Get an SamlAssertionWrapper to be validated
      Returns:
      an SamlAssertionWrapper to be validated
    • setTransformedToken

      public void setTransformedToken(SamlAssertionWrapper transformedToken)
      Set an SamlAssertionWrapper instance which corresponds to a Transformed Token.
      Parameters:
      transformedToken - a transformed SamlAssertionWrapper instance
    • getTransformedToken

      public SamlAssertionWrapper getTransformedToken()
      Get an SamlAssertionWrapper instance which corresponds to a Transformed Token.
      Returns:
      a transformed SamlAssertionWrapper instance
    • setPrincipal

      public void setPrincipal(Principal principal)
      Set the principal that supplies context information to the validators.
      Parameters:
      principal - the principal that supplies context information to the validators
    • getPrincipal

      public Principal getPrincipal()
      Get the principal
      Returns:
      the principal
    • setSubject

      public void setSubject(Subject subject)
      Set the subject that may result from the Validation process
      Parameters:
      subject - the subject that may result from the Validation process
    • getSubject

      public Subject getSubject()
      Get the subject that may result from the Validation process
      Returns:
      the subject that may result from the Validation process
    • getDelegationCredential

      public Object getDelegationCredential()
    • setDelegationCredential

      public void setDelegationCredential(Object delegationCredential)