sts

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTokenTTL = 5 * time.Minute

Variables

View Source
var (
	ErrInteractionRequired = errors.New("sts: interaction required")
	ErrNoUserIdentity      = errors.New("sts: exchange requires an inbound user token")
)

Functions

This section is empty.

Types

type Exchanger

type Exchanger interface {
	Exchange(ctx context.Context, principal *identity.Principal, gatewayID ids.GatewayID, cfg *registrydomain.MCPAuth, cacheKey string) (*Token, error)
}

func NewExchanger

func NewExchanger(signer TokenSigner, credentials appauth.CredentialFinder, idp IdPTokenClient) Exchanger

type IdPTokenClient

type IdPTokenClient interface {
	Call(ctx context.Context, issuer string, form url.Values) (*Token, error)
}

type Token

type Token struct {
	AccessToken string
	TokenType   string
	ExpiresAt   time.Time
}

type TokenSigner

type TokenSigner interface {
	Issuer() string
	MintClaims(claims jwt.MapClaims, ttl time.Duration) (string, error)
	JWKS() map[string]any
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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