Package land.oras.auth
Class AuthStoreAuthenticationProvider
java.lang.Object
land.oras.auth.AuthStoreAuthenticationProvider
- All Implemented Interfaces:
AuthProvider
@NullMarked
public final class AuthStoreAuthenticationProvider
extends Object
implements AuthProvider
AuthStoreAuthenticationProvider is an implementation of the
AuthProvider
interface.
It retrieves credentials from a AuthStore
and generates a Basic Authentication header.-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorAuthStoreAuthenticationProvider
(AuthStore authStore) Constructor. -
Method Summary
Modifier and TypeMethodDescription@Nullable String
getAuthHeader
(ContainerRef registry) Get the authentication header for this provider
-
Constructor Details
-
AuthStoreAuthenticationProvider
public AuthStoreAuthenticationProvider()Default constructor -
AuthStoreAuthenticationProvider
Constructor.- Parameters:
authStore
- The FileStore instance to retrieve credentials from.
-
-
Method Details
-
getAuthHeader
Description copied from interface:AuthProvider
Get the authentication header for this provider- Specified by:
getAuthHeader
in interfaceAuthProvider
- Parameters:
registry
- The registry- Returns:
- The authentication header or null if not applicable
-