Package land.oras.auth
Class BearerTokenProvider
java.lang.Object
land.oras.auth.BearerTokenProvider
- All Implemented Interfaces:
AuthProvider
A provider for bearer token authentication
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable StringgetAuthHeader(ContainerRef registry) Get the authentication header for this providerGet the authentication scheme for this provider@Nullable HttpClient.TokenResponsegetToken()Get the tokenvoidsetToken(HttpClient.TokenResponse token) Set the token
-
Constructor Details
-
BearerTokenProvider
public BearerTokenProvider()Create a new bearer token provider
-
-
Method Details
-
getToken
Get the token- Returns:
- The token
-
setToken
Set the token- Parameters:
token- The token
-
getAuthHeader
Description copied from interface:AuthProviderGet the authentication header for this provider- Specified by:
getAuthHeaderin interfaceAuthProvider- Parameters:
registry- The registry- Returns:
- The authentication header or null if not applicable
-
getAuthScheme
Description copied from interface:AuthProviderGet the authentication scheme for this provider- Specified by:
getAuthSchemein interfaceAuthProvider- Returns:
- The authentication scheme
-