Interface AuthorizationProvider
public interface AuthorizationProvider
Provides a contract for retrieving authorization secrets and credentials.
This interface is designed to support different authorization contexts.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the set of all available authorization contexts.Deprecated.getSecretForContext(String context) Retrieves the secret for a given authorization context.
-
Method Details
-
getContexts
Retrieves the set of all available authorization contexts. Each context typically corresponds to a specific service or environment for which a secret is available.- Returns:
- a
Set<String>containing all known contexts. Returns an empty set if no contexts are available.
-
getSecretForContext
Retrieves the secret for a given authorization context. The secret is provided as aSecretobject, which encapsulates the sensitive data in a secure way.- Parameters:
context- the specific authorization context for which the secret is required.- Returns:
- a
Secretobject for the specified context. Returnsnullif the context does not exist or no secret is associated with it.
-
getCredentials
Deprecated.UsegetSecretForContext(String)instead. This method will be removed in a future version.Retrieves generic credentials for authorization. This method is **deprecated** and should be avoided in new code. The preferred approach is to usegetSecretForContext(String)to retrieve secrets on a per-context basis for better security and specificity.- Returns:
- a
Credentialsobject.
-
getSecretForContext(String)instead.