Class JWKSetSpec.RotatedAccessTokenDirectEncryption

java.lang.Object
com.nimbusds.openid.connect.provider.jwkset.JWKSetSpec.RotatedAccessTokenDirectEncryption
Enclosing class:
JWKSetSpec

public static class JWKSetSpec.RotatedAccessTokenDirectEncryption extends Object
Rotated AES and ChaCha20 direct encryption keys for JWT-encoded access tokens.
  • Field Details

  • 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.
      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.