Versions in this module Expand all Collapse all v1 v1.0.1 Nov 28, 2023 Changes in this version + const ConsoleIDPCallbackURL + const ConsoleIDPCallbackURLDynamic + const ConsoleIDPClientID + const ConsoleIDPHmacPassphrase + const ConsoleIDPHmacSalt + const ConsoleIDPScopes + const ConsoleIDPSecret + const ConsoleIDPTokenExpiration + const ConsoleIDPURL + const ConsoleIDPUserInfo + const ConsoleMinIOServer + var DefaultDerivedKey = func() []byte + func GetIDPCallbackURL() string + func GetIDPCallbackURLDynamic() bool + func GetIDPClientID() string + func GetIDPSecret() string + func GetIDPURL() string + func GetIDPUserInfo() bool + func GetRandomStateWithHMAC(length int, keyFunc StateKeyFunc) string + func GetSTSEndpoint() string + func IsIDPEnabled() bool + type Config struct + func (ac Config) AuthCodeURL(state string, opts ...xoauth2.AuthCodeOption) string + func (ac Config) Client(ctx context.Context, t *xoauth2.Token) *http.Client + func (ac Config) Exchange(ctx context.Context, code string, opts ...xoauth2.AuthCodeOption) (*xoauth2.Token, error) + func (ac Config) PasswordCredentialsToken(ctx context.Context, username, password string) (*xoauth2.Token, error) + func (ac Config) TokenSource(ctx context.Context, t *xoauth2.Token) xoauth2.TokenSource + type Configuration interface + AuthCodeURL func(state string, opts ...xoauth2.AuthCodeOption) string + Client func(ctx context.Context, t *xoauth2.Token) *http.Client + Exchange func(ctx context.Context, code string, opts ...xoauth2.AuthCodeOption) (*xoauth2.Token, error) + PasswordCredentialsToken func(ctx context.Context, username, password string) (*xoauth2.Token, error) + TokenSource func(ctx context.Context, t *xoauth2.Token) xoauth2.TokenSource + type DiscoveryDoc struct + AuthEndpoint string + ClaimsSupported []string + CodeChallengeMethodsSupported []string + IDTokenSigningAlgValuesSupported []string + Issuer string + JwksURI string + ResponseTypesSupported []string + RevocationEndpoint string + ScopesSupported []string + SubjectTypesSupported []string + TokenEndpoint string + TokenEndpointAuthMethods []string + UserInfoEndpoint string + type LoginURLParams struct + IDPName string + State string + type OpenIDPCfg map[string]ProviderConfig + func (o OpenIDPCfg) NewOauth2ProviderClient(name string, scopes []string, r *http.Request, ...) (*Provider, error) + type Provider struct + IDPName string + RefreshToken string + UserInfo bool + func NewOauth2ProviderClient(scopes []string, r *http.Request, httpClient *http.Client) (*Provider, error) + func (client *Provider) GenerateLoginURL(keyFunc StateKeyFunc, iDPName string) string + func (client *Provider) VerifyIdentity(ctx context.Context, code, state, roleARN string, keyFunc StateKeyFunc) (*credentials.Credentials, error) + func (client *Provider) VerifyIdentityForOperator(ctx context.Context, code, state string, keyFunc StateKeyFunc) (*xoauth2.Token, error) + type ProviderConfig struct + ClientID string + ClientSecret string + DisplayName string + EndSessionEndpoint string + HMACPassphrase string + HMACSalt string + RedirectCallback string + RedirectCallbackDynamic bool + RoleArn string + Scopes string + URL string + Userinfo bool + func (pc ProviderConfig) GetARNInf() string + func (pc ProviderConfig) GetStateKeyFunc() StateKeyFunc + type StateKeyFunc func() []byte + type User struct + AppMetadata map[string]interface{} + Blocked bool + CreatedAt string + Email string + EmailVerified bool + FamilyName string + GivenName string + Identities []interface{} + LastIP string + LastLogin string + LastPasswordReset string + LoginsCount int + MultiFactor string + Name string + Nickname string + PhoneNumber string + PhoneVerified bool + Picture string + UpdatedAt string + UserID string + UserMetadata map[string]interface{} + Username string