Class JWKLookup


  • public class JWKLookup
    extends Object
    Helper class to look up and return the keys from specific JWK implementation algorithm types.
    • Constructor Detail

      • JWKLookup

        public JWKLookup()
    • Method Detail

      • lookup

        public Key lookup​(String json,
                          KeyType keyType)
                   throws FailedToLoadJWKException
        Lookup returns the key from the given json, under the assumption it's of the correct keyType.
        Parameters:
        json - JSON from which to attempt to generate a key
        keyType - The type of key we expect to be generated from the JSON
        Returns:
        a valid key for verifying a JWT
        Throws:
        FailedToLoadJWKException - If there's an issue handling the loading of the JWK