Class ImmutableSecret<C extends SecurityContext>

  • All Implemented Interfaces:
    JWKSource<C>

    @Immutable
    public class ImmutableSecret<C extends SecurityContext>
    extends ImmutableJWKSet<C>
    JSON Web Key (JWK) source backed by an immutable secret.
    Version:
    2016-04-10
    Author:
    Vladimir Dzhuvinov
    • Constructor Summary

      Constructors 
      Constructor Description
      ImmutableSecret​(byte[] secret)
      Creates a new JSON Web Key (JWK) source backed by an immutable secret.
      ImmutableSecret​(javax.crypto.SecretKey secretKey)
      Creates a new JSON Web Key (JWK) source backed by an immutable secret key.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getSecret()
      Returns the secret.
      javax.crypto.SecretKey getSecretKey()
      Returns the secret key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImmutableSecret

        public ImmutableSecret​(byte[] secret)
        Creates a new JSON Web Key (JWK) source backed by an immutable secret.
        Parameters:
        secret - The secret. Must not be empty or null.
      • ImmutableSecret

        public ImmutableSecret​(javax.crypto.SecretKey secretKey)
        Creates a new JSON Web Key (JWK) source backed by an immutable secret key.
        Parameters:
        secretKey - The secret key. Must not be null.
    • Method Detail

      • getSecret

        public byte[] getSecret()
        Returns the secret.
        Returns:
        The secret.
      • getSecretKey

        public javax.crypto.SecretKey getSecretKey()
        Returns the secret key.
        Returns:
        The secret key.