Package land.oras.auth
Class AbstractUsernamePasswordProvider
java.lang.Object
land.oras.auth.AbstractUsernamePasswordProvider
- All Implemented Interfaces:
AuthProvider
- Direct Known Subclasses:
UsernamePasswordProvider
public abstract sealed class AbstractUsernamePasswordProvider
extends Object
implements AuthProvider
permits UsernamePasswordProvider
A provider for username and password authentication
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractUsernamePasswordProvider
(String username, String password) Create a new username and password provider -
Method Summary
Modifier and TypeMethodDescription@NonNull String
getAuthHeader
(ContainerRef registry) Get the authentication header for this providerGet the passwordGet the username
-
Constructor Details
-
AbstractUsernamePasswordProvider
Create a new username and password provider- Parameters:
username
- The usernamepassword
- The password
-
-
Method Details
-
getUsername
Get the username- Returns:
- The username
-
getPassword
Get the password- Returns:
- The password
-
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
-