Versions in this module Expand all Collapse all v0 v0.2.0 Jun 28, 2026 Changes in this version + type AuthorizationRequest struct + AgentToken string + Duration int64 + InteractionType string + MissionDesc string + MissionName string + RedirectURI string + Scopes string + State string + UserID string + type AuthorizationResult struct + ConsentURI string + Error string + ErrorDesc string + MissionID string + Status string + StatusURI string + Token *Token + type Client struct + func New(baseURL string, opts ...Option) *Client + func (c *Client) CacheToken(key string, token *Token) + func (c *Client) ClearCache() + func (c *Client) ExchangeIDJAG(ctx context.Context, assertion, scope string) (*Token, error) + func (c *Client) ExchangeJWTBearer(ctx context.Context, assertion, scope string) (*Token, error) + func (c *Client) GetCachedToken(key string) *Token + func (c *Client) Introspect(ctx context.Context, token string) (*IntrospectionResult, error) + func (c *Client) PollConsentStatus(ctx context.Context, statusURI string) (*AuthorizationResult, error) + func (c *Client) RefreshToken(ctx context.Context, refreshToken, scope string) (*Token, error) + func (c *Client) RequestAuthorization(ctx context.Context, req *AuthorizationRequest) (*AuthorizationResult, error) + func (c *Client) RequestAuthorizationAndWait(ctx context.Context, req *AuthorizationRequest) (*Token, error) + func (c *Client) Revoke(ctx context.Context, token, tokenTypeHint string) error + func (c *Client) WaitForConsent(ctx context.Context, statusURI string) (*Token, error) + type IntrospectionResult struct + Act map[string]any + Active bool + Aud string + ClientID string + Exp int64 + Iat int64 + Iss string + Scope string + Sub string + TokenType string + Username string + type Option func(*Client) + func WithHTTPClient(httpClient *http.Client) Option + func WithPollInterval(interval time.Duration) Option + func WithPollTimeout(timeout time.Duration) Option + type Token struct + AccessToken string + ExpiresAt time.Time + ExpiresIn int + RefreshToken string + Scope string + TokenType string + func (t *Token) IsExpired() bool + func (t *Token) IsExpiringSoon(within time.Duration) bool