auth

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 21 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotLoggedIn = errors.New("not logged in")

Functions

func LoadDefaults

func LoadDefaults() (api.TokenSource, error)

func LoadLocalToken added in v0.0.10

func LoadLocalToken(path string) (api.TokenSource, error)

LoadLocalToken returns a TokenSource that reloads the token from the specified file path on each IssueToken call, allowing the token to be updated without restarting the process.

func LoadUserToken

func LoadUserToken() (api.TokenSource, error)

func LoadWorkloadToken

func LoadWorkloadToken() (api.TokenSource, error)

func TenantCertificateSource added in v0.0.4

func TenantCertificateSource(client iam.Client, tenantId string) api.TokenAndCertificateSource

func TenantTokenSource added in v0.0.4

func TenantTokenSource(client iam.Client, tenantId string) api.TokenAndCertificateSource

Types

type TokenClaims

type TokenClaims struct {
	jwt.RegisteredClaims

	TenantID       string `json:"tenant_id"`
	ActorID        string `json:"actor_id"`
	InstanceID     string `json:"instance_id"`
	OwnerID        string `json:"owner_id"`
	PrimaryRegion  string `json:"primary_region"`
	WorkloadRegion string `json:"workload_region"`
}

func ExtractClaims added in v0.0.9

func ExtractClaims(token string) (*TokenClaims, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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