Class JWKSetSpec.RotatedAccessTokenDirectEncryption
java.lang.Object
com.nimbusds.openid.connect.provider.jwkset.JWKSetSpec.RotatedAccessTokenDirectEncryption
- Enclosing class:
- JWKSetSpec
Rotated AES and ChaCha20 direct encryption keys for JWT-encoded
access tokens.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int[]
The JWK sizes.static final com.nimbusds.jose.jwk.JWKMatcher
Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.nimbusds.jose.jwk.JWKMatcher
createKeyMatcher
(com.nimbusds.jose.EncryptionMethod enc) Returns a JWK matcher for the specified JWE encryption method.static com.nimbusds.jose.jwk.OctetSequenceKey
generateKey
(String kid) Generates a 128 bit JWK with the specified key ID.static com.nimbusds.jose.jwk.OctetSequenceKey
generateKey
(String kid, int bitSize) Generates a JWK with the specified key ID and bit size.static List<com.nimbusds.jose.jwk.OctetSequenceKey>
loadKeys
(com.nimbusds.jose.jwk.JWKSet jwkSet) Deprecated.UseloadKeys(JWKSet, EncryptionMethod)
instead.static List<com.nimbusds.jose.jwk.OctetSequenceKey>
loadKeys
(com.nimbusds.jose.jwk.JWKSet jwkSet, com.nimbusds.jose.EncryptionMethod enc) Loads the matching JWKs from the specified JWK set.
-
Field Details
-
KEY_BIT_SIZES
public static final int[] KEY_BIT_SIZESThe JWK sizes. -
KEY_MATCHER
Deprecated.UsecreateKeyMatcher(com.nimbusds.jose.EncryptionMethod)
instead.The JWK matcher.
-
-
Method Details
-
createKeyMatcher
public static com.nimbusds.jose.jwk.JWKMatcher createKeyMatcher(com.nimbusds.jose.EncryptionMethod enc) Returns a JWK matcher for the specified JWE encryption method.- Parameters:
enc
- The JWE encryption method.- Returns:
- The JWK matcher.
-
generateKey
public static com.nimbusds.jose.jwk.OctetSequenceKey generateKey(String kid) throws com.nimbusds.jose.JOSEException Generates a 128 bit JWK with the specified key ID.- Parameters:
kid
- The key ID,null
if not specified.- Returns:
- The JWK.
- Throws:
com.nimbusds.jose.JOSEException
-
generateKey
public static com.nimbusds.jose.jwk.OctetSequenceKey generateKey(String kid, int bitSize) throws com.nimbusds.jose.JOSEException Generates a JWK with the specified key ID and bit size.- Parameters:
kid
- The key ID,null
if not specified.bitSize
- The key bit size.- Returns:
- The JWK.
- Throws:
com.nimbusds.jose.JOSEException
-
loadKeys
@Deprecated public static List<com.nimbusds.jose.jwk.OctetSequenceKey> loadKeys(com.nimbusds.jose.jwk.JWKSet jwkSet) Deprecated.UseloadKeys(JWKSet, EncryptionMethod)
instead.Loads the matching JWKs from the specified JWK set.- Parameters:
jwkSet
- The JWK set.- Returns:
- The matching JWKs, empty set if none.
-
loadKeys
public static List<com.nimbusds.jose.jwk.OctetSequenceKey> loadKeys(com.nimbusds.jose.jwk.JWKSet jwkSet, com.nimbusds.jose.EncryptionMethod enc) Loads the matching JWKs from the specified JWK set.- Parameters:
jwkSet
- The JWK set.enc
- The JWE encryption method.- Returns:
- The matching JWKs, empty set if none.
-
createKeyMatcher(com.nimbusds.jose.EncryptionMethod)
instead.