Class WebOidcClient

java.lang.Object
dev.sigstore.oidc.client.WebOidcClient
All Implemented Interfaces:
OidcClient

public class WebOidcClient extends Object implements OidcClient
A client to obtain oidc tokens from an oauth provider via web workflow for use with sigstore. By default this client is configued to use the public sigstore dex instance.
  • Method Details

    • builder

      public static WebOidcClient.Builder builder()
    • isEnabled

      public boolean isEnabled(Map<String,String> env)
      This provider is usually enabled unless we're in CI.
      Specified by:
      isEnabled in interface OidcClient
      Parameters:
      env - the configured system environment
      Returns:
      true if we should use credentials from this client
    • getIDToken

      public OidcToken getIDToken(Map<String,String> env) throws OidcException
      Get an id token from the oidc provider with openid and email scopes
      Specified by:
      getIDToken in interface OidcClient
      Returns:
      an openid token with additional email scopes
      Throws:
      OidcException - if an error occurs doing the authorization flow