Interface CloseableVerificationKeyResolver

All Superinterfaces:
AutoCloseable, Closeable, Initable, org.jose4j.keys.resolvers.VerificationKeyResolver
All Known Implementing Classes:
JwksFileVerificationKeyResolver, RefreshingHttpsJwksVerificationKeyResolver

public interface CloseableVerificationKeyResolver extends Initable, Closeable, org.jose4j.keys.resolvers.VerificationKeyResolver
The OAuthBearerValidatorCallbackHandler uses a VerificationKeyResolver as part of its validation of the incoming JWT. Some of the VerificationKeyResolver implementations use resources like threads, connections, etc. that should be properly closed when no longer needed. Since the VerificationKeyResolver interface itself doesn't define a close method, we provide a means to do that here.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Lifecycle method to perform a clean shutdown of the VerificationKeyResolver.

    Methods inherited from interface org.apache.kafka.common.security.oauthbearer.secured.Initable

    init

    Methods inherited from interface org.jose4j.keys.resolvers.VerificationKeyResolver

    resolveKey
  • Method Details

    • close

      default void close() throws IOException
      Lifecycle method to perform a clean shutdown of the VerificationKeyResolver. This must be performed by the caller to ensure the correct state, freeing up and releasing any resources performed in Initable.init().
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - Thrown on errors related to IO during closure