Class AuthStore

java.lang.Object
land.oras.auth.AuthStore

@NullMarked public class AuthStore extends Object
Implements a credentials store using a configuration file to keep the credentials in plain-text. Reference: Docker config
  • Field Details

    • ERR_BAD_CREDENTIAL_FORMAT

      public static final String ERR_BAD_CREDENTIAL_FORMAT
      Error message indicating that the format of the provided credential is invalid. This is typically used when credentials do not match the expected structure or format.
      See Also:
  • Method Details

    • newStore

      public static AuthStore newStore(List<Path> configPaths)
      Creates a new FileStore based on the given configuration file path.
      Parameters:
      configPaths - Path to the configuration files.
      Returns:
      FileStore instance.
    • newStore

      public static AuthStore newStore()
      Creates a new FileStore from default location
      Returns:
      FileStore instance.
    • get

      public @Nullable AuthStore.Credential get(ContainerRef containerRef) throws OrasException
      Retrieves credentials for the given containerRef.
      Parameters:
      containerRef - ContainerRef.
      Returns:
      Credential object or null if no credential is found.
      Throws:
      OrasException