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 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
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 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 ¶
Directories ¶
Path | Synopsis |
---|---|
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.