Class ImmutableSecret<C extends SecurityContext>

java.lang.Object
com.nimbusds.jose.jwk.source.ImmutableJWKSet<C>
com.nimbusds.jose.jwk.source.ImmutableSecret<C>
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 Details

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

    • getSecret

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

      Returns the secret key.
      Returns:
      The secret key.