Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker interface {
// Exchange obtains a downscoped access (and optional id) token for the given audience with at least minTTL.
Exchange(ctx context.Context, k tokens.Key, minTTL time.Duration) (access scyauth.Token, id string, err error)
// Refresh refreshes tokens to satisfy minTTL without changing audience.
Refresh(ctx context.Context, k tokens.Key, minTTL time.Duration) (access scyauth.Token, id string, err error)
}
Broker provides access/ID tokens via exchange or refresh using BFF-backed flows.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver ensures valid tokens are available with required TTLs using a token Store and Broker.
func (*Resolver) EnsureAccess ¶
EnsureAccess returns an access token with at least MinTTL.Access remaining. If missing or expiring, it uses the broker to exchange or refresh and updates the store.
func (*Resolver) EnsureAccessAndID ¶
func (r *Resolver) EnsureAccessAndID(ctx context.Context, key tokens.Key) (access scyauth.Token, id string, err error)
EnsureAccessAndID ensures both access and ID tokens meet MinTTL thresholds.
func (*Resolver) InvalidateAccess ¶
InvalidateAccess forces the next EnsureAccess() to obtain a fresh token.
Click to show internal directories.
Click to hide internal directories.