Documentation
¶
Index ¶
- func ExtractEmail(token string) (email string, verified bool, err error)
- func ExtractExpiry(token string) (time.Time, error)
- func ExtractIssuer(token string) (string, error)
- func ExtractIssuerAndSubject(token string) (string, string, error)
- func ExtractRefreshExpiry(token string) (time.Time, error)
- func GetToken(ctx context.Context) string
- func NewChainctlTokenSource(ctx context.Context, opts ...Option) oauth2.TokenSource
- func NewFromContext(_ context.Context, requireTransportSecurity bool) credentials.PerRPCCredentials
- func NewFromFile(ctx context.Context, path string, requireTransportSecurity bool) credentials.PerRPCCredentials
- func NewFromToken(_ context.Context, token string, requireTransportSecurity bool) credentials.PerRPCCredentials
- func NormalizeIssuer(issuer string) string
- func WithToken(ctx context.Context, authz string) context.Context
- type Actor
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractEmail ¶ added in v0.1.16
func ExtractIssuer ¶
func ExtractRefreshExpiry ¶ added in v0.1.20
func NewChainctlTokenSource ¶ added in v0.1.33
func NewChainctlTokenSource(ctx context.Context, opts ...Option) oauth2.TokenSource
func NewFromContext ¶
func NewFromContext(_ context.Context, requireTransportSecurity bool) credentials.PerRPCCredentials
NewFromContext creates a new credentials.PerRPCCredentials based on a token stored in context. This allows callers to provide a token for each RPC.
func NewFromFile ¶
func NewFromFile(ctx context.Context, path string, requireTransportSecurity bool) credentials.PerRPCCredentials
NewFromFile attempts to create a new credentials.PerRPCCredentials based on the provided file. Returns nil if not found.
func NewFromToken ¶
func NewFromToken(_ context.Context, token string, requireTransportSecurity bool) credentials.PerRPCCredentials
NewFromToken attempts to create a new credentials.PerRPCCredentials based on provided OIDC token.
func NormalizeIssuer ¶
NormalizeIssuer massages an issuer string into a canonical form, such as attaching a scheme when certain "special" vendors omit them.
Types ¶
type Actor ¶
type Actor struct { Audience string `json:"aud"` Issuer string `json:"iss"` Subject string `json:"sub"` }
func ExtractActor ¶
type Option ¶ added in v0.1.33
type Option func(*options)
func WithAudience ¶ added in v0.1.33
func WithIssuer ¶ added in v0.1.33
Directories
¶
Path | Synopsis |
---|---|
Package ggcr provides a go-containerregistry authn.Keychain for the cgr.dev registry.
|
Package ggcr provides a go-containerregistry authn.Keychain for the cgr.dev registry. |
Package login implements client login functionality shared between various clients
|
Package login implements client login functionality shared between various clients |
Click to show internal directories.
Click to hide internal directories.