Class JwtSigningKeyProvider

    • Constructor Detail

      • JwtSigningKeyProvider

        public JwtSigningKeyProvider()
    • Method Detail

      • select

        @CheckForNull
        public abstract SigningKey select​(JwtToken token)
        Chooses the key to sign the given token.
        Parameters:
        token - Token to be signed
        Returns:
        null if this provider refuses to sign the given token, in which case the next provider will get the chance.
      • getPublicKey

        @CheckForNull
        public abstract SigningPublicKey getPublicKey​(String keyId)
        Provides public key needed to verify the token.
        Parameters:
        keyId - SigningKey.kid returned from select(JwtToken)
        Returns:
        null if this provider doesn't recognize the given key ID.
      • toPublicKey

        @CheckForNull
        public static SigningPublicKey toPublicKey​(String keyId)
        Search through all the providers and find the public key that matches the given key ID.