Class PrivateKeyBinding

  • All Implemented Interfaces:
    SecurityPolicy, Cloneable

    public class PrivateKeyBinding
    extends WSSPolicy
    Objects of this class act as KeyBindings for AuthenticationTokens such as AuthenticationTokenPolicy.X509CertificateBinding and AuthenticationTokenPolicy.SAMLAssertionBinding. When associated with an AuthenticationToken they represent the PrivateKey associated with the AuthenticationToken.
    • Constructor Detail

      • PrivateKeyBinding

        public PrivateKeyBinding()
        Default constructor
      • PrivateKeyBinding

        public PrivateKeyBinding​(String keyIdentifier,
                                 String keyAlgorithm)
        Constructor
        Parameters:
        keyIdentifier - identifier for the Private Key
        keyAlgorithm - identified for the Key Algorithm
    • Method Detail

      • setKeyIdentifier

        public void setKeyIdentifier​(String keyIdentifier)
        set the keyIdentifier for the Private Key
        Parameters:
        keyIdentifier - Key Identifier for the Private Key
      • getKeyIdentifier

        public String getKeyIdentifier()
        Returns:
        key identifier for the Private Key
      • setKeyAlgorithm

        public void setKeyAlgorithm​(String keyAlgorithm)
        set the KeyAlgorithm of this Private Key. Implementation Note: This KeyAlgorithm is not used by XWS-Runtime, refer setKeyAlgorithm on X509CertificateBinding, SAMLAssertionBinding, and SymmetricKeyBinding instead.
        Parameters:
        keyAlgorithm - KeyAlgorithm of this Private Key
      • getKeyAlgorithm

        public String getKeyAlgorithm()
        Returns:
        KeyAlgorithm of this Private Key
      • setPrivateKey

        public void setPrivateKey​(PrivateKey privateKey)
        set the private key instance
        Parameters:
        privateKey - PrivateKey for this PrivateKeyBinding
      • getPrivateKey

        public PrivateKey getPrivateKey()
        Returns:
        PrivateKey associated with this PrivateKeyBinding
      • getType

        public String getType()
        Description copied from interface: SecurityPolicy
        Get the type of the policy.

        Implementation Note: Useful to avoid instanceof checks and String.equals checks

        Returns:
        the type of the policy