Documentation
¶
Index ¶
- type Config
- func (c *Config) AuthCodeURL(state string, opts ...auth_code_option.AuthCodeOption) string
- func (c *Config) Client(ctx context.Context, t *token.Token) *http.Client
- func (c *Config) ClientCredentialsToken(ctx context.Context) (*token.Token, error)
- func (c *Config) Exchange(ctx context.Context, code string, opts ...auth_code_option.AuthCodeOption) (*token.Token, error)
- func (c *Config) PasswordCredentialsToken(ctx context.Context, username, password string) (*token.Token, error)
- func (c *Config) TokenSource(ctx context.Context, t *token.Token) token_source.TokenSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ClientID string
ClientSecret string
Endpoint endpoint.Endpoint
RedirectURL string
Scopes []string
FetchOptions []fetch_config.Option
}
func (*Config) AuthCodeURL ¶
func (c *Config) AuthCodeURL(state string, opts ...auth_code_option.AuthCodeOption) string
func (*Config) Client ¶
Client returns an *http.Client that automatically sets OAuth2 authorization headers using a token source that refreshes the provided token as needed.
func (*Config) ClientCredentialsToken ¶
func (*Config) Exchange ¶
func (c *Config) Exchange(ctx context.Context, code string, opts ...auth_code_option.AuthCodeOption) (*token.Token, error)
func (*Config) PasswordCredentialsToken ¶
func (*Config) TokenSource ¶
func (c *Config) TokenSource(ctx context.Context, t *token.Token) token_source.TokenSource
Click to show internal directories.
Click to hide internal directories.