Versions in this module Expand all Collapse all v20241113002 v20241113002.0.0 Dec 4, 2024 Changes in this version + var ErrTimeout = errors.New("authentication timed out") + func IsTimeoutErr(err error) bool + type Config struct + AuthURL *url.URL + ClientID string + Scopes []string + UserAgent string + func NewConfig(httpClient *http.Client) *Config + func NewConfigWithOptions(httpClient *http.Client, opts ...ConfigOpt) (*Config, error) + func (c *Config) Do(ctx context.Context, req *http.Request, v any) (*core.Response, error) + func (c *Config) NewRequest(ctx context.Context, method, urlStr string, v url.Values) (*http.Request, error) + func (c Config) GetToken(ctx context.Context, deviceCode string) (*Token, *core.Response, error) + func (c Config) PollToken(ctx context.Context, code *DeviceCode) (*Token, *core.Response, error) + func (c Config) RefreshToken(ctx context.Context, token string) (*Token, *core.Response, error) + func (c Config) RegistrationConfig(ctx context.Context) (*RegistrationConfig, *core.Response, error) + func (c Config) RequestCode(ctx context.Context) (*DeviceCode, *core.Response, error) + func (c Config) RevokeToken(ctx context.Context, token, tokenTypeHint string) (*core.Response, error) + type ConfigOpt func(*Config) error + func SetAuthURL(bu string) ConfigOpt + func SetClientID(clientID string) ConfigOpt + func SetScopes(scopes []string) ConfigOpt + func SetUserAgent(ua string) ConfigOpt + func SetWithRaw() ConfigOpt + type DeviceCode struct + DeviceCode string + ExpiresIn int + Interval int + UserCode string + VerificationURI string + type RegistrationConfig struct + RegistrationURL string + type Token struct + AccessToken string + ExpiresIn int + Expiry time.Time + IDToken string + RefreshToken string + Scope string + TokenType string + func (t *Token) SetAuthHeader(r *http.Request) + func (t *Token) Valid() bool + type TokenSource interface + Token func() (*Token, error) Other modules containing this package go.mongodb.org/atlas-sdk/v20240805005 go.mongodb.org/atlas-sdk/v20241023001 go.mongodb.org/atlas-sdk/v20241023002 go.mongodb.org/atlas-sdk/v20241113001 go.mongodb.org/atlas-sdk/v20241113003 go.mongodb.org/atlas-sdk/v20241113004