Package land.oras.auth
Interface AuthProvider
- All Known Implementing Classes:
AbstractUsernamePasswordProvider,AuthStoreAuthenticationProvider,BearerTokenProvider,NoAuthProvider,UsernamePasswordProvider
public interface AuthProvider
Interface for auth provider
Must return the authentication header to pass to HTTP requests
-
Method Summary
Modifier and TypeMethodDescription@Nullable StringgetAuthHeader(ContainerRef registry) Get the authentication header for this providerGet the authentication scheme for this providerdefault StringgetIdentity(ContainerRef registry) Get an opaque identity marker for the credentials this provider resolves for the given registry.
-
Method Details
-
getAuthHeader
Get the authentication header for this provider- Parameters:
registry- The registry- Returns:
- The authentication header or null if not applicable
-
getAuthScheme
AuthScheme getAuthScheme()Get the authentication scheme for this provider- Returns:
- The authentication scheme
-
getIdentity
Get an opaque identity marker for the credentials this provider resolves for the given registry. This marker is used to keyTokenCacheentries alongside the requestedScopes- Parameters:
registry- The registry- Returns:
- A non-null identity marker
-