Class FileBasedTokenProvider

java.lang.Object
io.strimzi.kafka.oauth.common.FileBasedTokenProvider
All Implemented Interfaces:
TokenProvider

public class FileBasedTokenProvider extends Object implements TokenProvider
A TokenProvider that uses a file as a token source. The content of the file is fully read and returned every time a token() method is called.
  • Constructor Details

    • FileBasedTokenProvider

      public FileBasedTokenProvider(String tokenFilePath)
      Create a new instance that refers to a specified file as a token source.
      Parameters:
      tokenFilePath - A path to a file containing a token
      Throws:
      IllegalArgumentException - if the specified tokenFilePath does not exist or is not a regular file
  • Method Details