auth

package
v2.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SigstoreOIDCIssuerAPIVersions = []uint32{1}

Functions

func AuthenticateCaller

func AuthenticateCaller(flow, idToken, oidcIssuer, oidcClientID, oidcClientSecret, oidcRedirectURL string) (string, string, error)

AuthenticateCaller performs an OpenID Connect authentication to exchange credentials for an identity token

func GetOAuthFlow

func GetOAuthFlow(ctx context.Context, authFlow, idToken string, skipConfirm bool) (string, error)

GetOAuthFlow returns authentication flow that the client will initiate

func ReadIDToken

func ReadIDToken(ctx context.Context, tokOrPath string, disableProviders bool, oidcProvider string) (string, error)

ReadIDToken returns an OpenID Connect token from either a file or a well-known location from an identity provider

func RetrieveIDToken

func RetrieveIDToken(ctx context.Context, c IDTokenConfig) (string, error)

RetrieveIDToken returns an ID token from one of the following sources: * Flag value * File, path provided by flag * Provider, e.g. a well-known location of a token for an environment like K8s or CI/CD * OpenID Connect authentication protocol

Types

type IDTokenConfig

type IDTokenConfig struct {
	TokenOrPath      string
	DisableProviders bool
	Provider         string
	AuthFlow         string
	SkipConfirm      bool
	OIDCServices     []root.Service
	ClientID         string
	ClientSecret     string
	RedirectURL      string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL