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 Details

    • AuthStoreAuthenticationProvider

      public AuthStoreAuthenticationProvider()
      Default constructor
    • AuthStoreAuthenticationProvider

      public AuthStoreAuthenticationProvider(AuthStore authStore)
      Constructor.
      Parameters:
      authStore - The FileStore instance to retrieve credentials from.
  • Method Details

    • getAuthHeader

      public @Nullable String getAuthHeader(ContainerRef registry)
      Description copied from interface: AuthProvider
      Get the authentication header for this provider
      Specified by:
      getAuthHeader in interface AuthProvider
      Parameters:
      registry - The registry
      Returns:
      The authentication header or null if not applicable