Interface AccessTokenRetriever
- All Superinterfaces:
AutoCloseable,Closeable,Initable
- All Known Implementing Classes:
FileTokenRetriever,HttpAccessTokenRetriever
An
AccessTokenRetriever is the internal API by which the login module will
retrieve an access token for use in authorization by the broker. The implementation may
involve authentication to a remote system, or it can be as simple as loading the contents
of a file or configuration setting.
Retrieval is a separate concern from validation, so it isn't necessary for
the AccessTokenRetriever implementation to validate the integrity of the JWT
access token.- See Also:
-
Method Summary
-
Method Details
-
retrieve
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 theLoginModulefrom which this is ultimately called does not provide an asynchronous approach.- Returns:
- Non-
nullJWT access token string - Throws:
IOException- Thrown on errors related to IO during retrieval
-
close
Lifecycle method to perform a clean shutdown of the retriever. This must be performed by the caller to ensure the correct state, freeing up and releasing any resources performed inInitable.init().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- Thrown on errors related to IO during closure
-