Versions in this module Expand all Collapse all v1 v1.2.0 Aug 11, 2025 Changes in this version + func Authentication(_ *azugo.App, config *Configuration, states ...string) azugo.RequestHandlerFunc + func UserHasScope(scope string, next azugo.RequestHandler) azugo.RequestHandler + func UserHasScopeAtLeastLevel(scope string, level ScopeLevel, next azugo.RequestHandler) azugo.RequestHandler + func UserHasScopeLevel(scope string, level ScopeLevel, next azugo.RequestHandler) azugo.RequestHandler + type Client struct + func NewClient(config *Configuration) (*Client, error) + func (c Client) UserInfo(ctx *azugo.Context, opts ...http.RequestOption) (*UserinfoResponse, error) + type Configuration struct + ClientID string + ClientSecret string + URL string + func (c *Configuration) Bind(prefix string, v *viper.Viper) + func (c *Configuration) Validate(valid *validation.Validate) error + type ScopeLevel string + const ScopeLevelDelete + const ScopeLevelExport + const ScopeLevelRead + const ScopeLevelWrite + type SystemTokenClient struct + func NewSystemTokenClient(config *SystemTokenConfiguration) (*SystemTokenClient, error) + func (c *SystemTokenClient) GetSystemToken(ctx *azugo.Context, scope string) (string, error) + type SystemTokenConfiguration struct + Certificate string + ClientID string + URL string + func (c *SystemTokenConfiguration) Bind(prefix string, v *viper.Viper) + func (c *SystemTokenConfiguration) Validate(validate *validation.Validate) error + type TokenCache struct + ClientID string + ExpiresAt int64 + Token string + type TokenResponse struct + AccessToken string + ExpiresIn int + TokenType string + type UserinfoResponse struct + Active bool + Code string + FamilyName string + GivenName string + IsSessionExtendable bool + OrganizationCode string + OrganizationName string + Scope []string + SecondsToCountdown int + SecondsToLive int + SessionID string + State string + UserID string + func (s *UserinfoResponse) ToClaims() map[string]token.ClaimStrings