Interface CredentialsManager
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
CredentialsManager.NoOpCredentialsManager, TokenCredentialsManager
Contract to authenticate and possibly re-authenticate application components.
A typical "application component" is a connection.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceComponent authentication callback.static classstatic classstatic interfaceA component registration. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the credentials manager and release its resources.register(String name, CredentialsManager.AuthenticationCallback updateCallback) Register a component for authentication.
-
Field Details
-
NO_OP
No-op credentials manager.
-
-
Method Details
-
register
CredentialsManager.Registration register(String name, CredentialsManager.AuthenticationCallback updateCallback) Register a component for authentication.- Parameters:
name- component name (must be unique)updateCallback- callback to update the component authentication- Returns:
- the registration (must be closed when no longer necessary)
-
close
void close()Close the credentials manager and release its resources.- Specified by:
closein interfaceAutoCloseable
-