Interface PublicKeyService

  • All Known Implementing Classes:
    KeycloakPublicKeyService

    public interface PublicKeyService
    How to find a public key to validate a JWT?
    • Method Summary

      Modifier and Type Method Description
      java.util.Optional<java.security.PublicKey> findPublicKey​(java.lang.String kid)
      This method finds a public key identified by an identifier, generally stored in a JWT header.
    • Method Detail

      • findPublicKey

        java.util.Optional<java.security.PublicKey> findPublicKey​(java.lang.String kid)
        This method finds a public key identified by an identifier, generally stored in a JWT header.
        Parameters:
        kid - a key id
        Returns:
        the public key identified by kid ; or return empty() is the public key has not been found.