Package com.nimbusds.jose.jwk.source
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 Summary
Constructors Constructor Description ImmutableSecret(byte[] secret)
Creates a new JSON Web Key (JWK) source backed by an immutable secret.ImmutableSecret(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.SecretKey
getSecretKey()
Returns the secret key.-
Methods inherited from class com.nimbusds.jose.jwk.source.ImmutableJWKSet
get, getJWKSet
-
-
-
-
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 ornull
.
-
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 benull
.
-
-
Method Detail
-
getSecret
public byte[] getSecret()
Returns the secret.- Returns:
- The secret.
-
getSecretKey
public SecretKey getSecretKey()
Returns the secret key.- Returns:
- The secret key.
-
-