Versions in this module Expand all Collapse all v20230201004 v20230201004.1.0 Aug 1, 2023 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 interface{}) (*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 go.mongodb.org/atlas-sdk/v20230201001 go.mongodb.org/atlas-sdk/v20230201002 go.mongodb.org/atlas-sdk/v20230201003 go.mongodb.org/atlas-sdk/v20230201005 go.mongodb.org/atlas-sdk/v20230201006 go.mongodb.org/atlas-sdk/v20230201007 go.mongodb.org/atlas-sdk/v20230201008 go.mongodb.org/atlas-sdk/v20231001001 go.mongodb.org/atlas-sdk/v20231001002 go.mongodb.org/atlas-sdk/v20231115001 go.mongodb.org/atlas-sdk/v20231115002 go.mongodb.org/atlas-sdk/v20231115003 go.mongodb.org/atlas-sdk/v20231115004 go.mongodb.org/atlas-sdk/v20231115005 go.mongodb.org/atlas-sdk/v20231115006 go.mongodb.org/atlas-sdk/v20231115007 go.mongodb.org/atlas-sdk/v20231115008 go.mongodb.org/atlas-sdk/v20231115009 go.mongodb.org/atlas-sdk/v20231115010 go.mongodb.org/atlas-sdk/v20231115011 go.mongodb.org/atlas-sdk/v20231115012 go.mongodb.org/atlas-sdk/v20231115013 go.mongodb.org/atlas-sdk/v20231115014 go.mongodb.org/atlas-sdk/v20240530001 go.mongodb.org/atlas-sdk/v20240530002 go.mongodb.org/atlas-sdk/v20240530003 go.mongodb.org/atlas-sdk/v20240530004 go.mongodb.org/atlas-sdk/v20240530005 go.mongodb.org/atlas-sdk/v20240805001 go.mongodb.org/atlas-sdk/v20240805002 go.mongodb.org/atlas-sdk/v20240805003 go.mongodb.org/atlas-sdk/v20240805004 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/v20241113002 go.mongodb.org/atlas-sdk/v20241113003 go.mongodb.org/atlas-sdk/v20241113004