Class JWKSetJwksSignature

java.lang.Object
io.micronaut.security.token.jwt.signature.jwks.JWKSetJwksSignature
All Implemented Interfaces:
SignatureConfiguration
Direct Known Subclasses:
StaticJwksSignature

@Internal public class JWKSetJwksSignature extends Object implements SignatureConfiguration
SignatureConfiguration backed by a JWKSet.
  • Constructor Details

    • JWKSetJwksSignature

      public JWKSetJwksSignature(JwkValidator jwkValidator, com.nimbusds.jose.jwk.JWKSet jwkSet)
  • Method Details

    • supportedAlgorithmsMessage

      public String supportedAlgorithmsMessage()
      Specified by:
      supportedAlgorithmsMessage in interface SignatureConfiguration
      Returns:
      A message indicating the supported algorithms.
    • supports

      public boolean supports(com.nimbusds.jose.JWSAlgorithm algorithm)
      Whether this signature configuration supports this algorithm.
      Specified by:
      supports in interface SignatureConfiguration
      Parameters:
      algorithm - the signature algorithm
      Returns:
      whether this signature configuration supports this algorithm
    • verify

      public boolean verify(com.nimbusds.jwt.SignedJWT jwt) throws com.nimbusds.jose.JOSEException
      Description copied from interface: SignatureConfiguration
      Verify a signed JWT.
      Specified by:
      verify in interface SignatureConfiguration
      Parameters:
      jwt - the signed JWT
      Returns:
      whether the signed JWT is verified
      Throws:
      com.nimbusds.jose.JOSEException - exception when verifying the JWT