Interface BearerTokenProvider
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
FileBearerTokenProvider,StaticBearerTokenProvider
Interface for providing bearer tokens for authentication.
Implementations can provide tokens from various sources such as:
- Static string values
- Files (with automatic reloading)
- External token services
-
Method Summary
-
Method Details
-
getToken
Get the current bearer token.- Returns:
- the bearer token, or null if no token is available
-
close
default void close()Clean up any resources used by this token provider. Should be called when the provider is no longer needed.- Specified by:
closein interfaceAutoCloseable
-