Class FileJwtRetriever

java.lang.Object
org.apache.kafka.common.security.oauthbearer.FileJwtRetriever
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.kafka.common.security.oauthbearer.internals.secured.OAuthBearerConfigurable, JwtRetriever

public class FileJwtRetriever extends Object implements JwtRetriever
FileJwtRetriever is an JwtRetriever that will load the contents of a file, interpreting them as a JWT access key in the serialized form.
  • Constructor Details

    • FileJwtRetriever

      public FileJwtRetriever()
  • Method Details

    • configure

      public void configure(Map<String,?> configs, String saslMechanism, List<AppConfigurationEntry> jaasConfigEntries)
      Specified by:
      configure in interface org.apache.kafka.common.security.oauthbearer.internals.secured.OAuthBearerConfigurable
    • retrieve

      public String retrieve() throws JwtRetrieverException
      Description copied from interface: JwtRetriever
      Retrieves a JWT access token in its serialized three-part form. The implementation is free to determine how it should be retrieved but should not perform validation on the result. Note: This is a blocking function and callers should be aware that the implementation may be communicating over a network, with the file system, coordinating threads, etc. The facility in the LoginModule from which this is ultimately called does not provide an asynchronous approach.
      Specified by:
      retrieve in interface JwtRetriever
      Returns:
      Non-null JWT access token string
      Throws:
      JwtRetrieverException - Thrown on errors related to IO during retrieval