Documentation
¶
Overview ¶
Package oauthgoogle provides a Google OAuth provider for the Limen OAuth plugin.
Index ¶
- func New(opts ...ConfigOption) oauth.Provider
- type ConfigOption
- func WithClientID(id string) ConfigOption
- func WithClientSecret(secret string) ConfigOption
- func WithIDTokenVerifier(verifier oauth.IDTokenVerifier) ConfigOption
- func WithOption(key, value string) ConfigOption
- func WithRedirectURL(url string) ConfigOption
- func WithScopes(scopes ...string) ConfigOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts ...ConfigOption) oauth.Provider
New creates a Google OAuth provider that implements oauth.Provider.
Types ¶
type ConfigOption ¶
type ConfigOption func(*config)
ConfigOption configures the Google OAuth plugin.
func WithClientID ¶
func WithClientID(id string) ConfigOption
WithClientID sets the Google OAuth2 client ID. Defaults to env var GOOGLE_CLIENT_ID.
func WithClientSecret ¶
func WithClientSecret(secret string) ConfigOption
WithClientSecret sets the Google OAuth2 client secret. Defaults to env var GOOGLE_CLIENT_SECRET.
func WithIDTokenVerifier ¶
func WithIDTokenVerifier(verifier oauth.IDTokenVerifier) ConfigOption
func WithOption ¶
func WithOption(key, value string) ConfigOption
WithOption sets any additional OAuth2 options such as "prompt", "access_type", etc.
func WithRedirectURL ¶
func WithRedirectURL(url string) ConfigOption
WithRedirectURL sets the callback URL registered in Google Cloud Console.
func WithScopes ¶
func WithScopes(scopes ...string) ConfigOption
WithScopes sets the OAuth2 scopes (e.g. "openid", "email", "profile").
Click to show internal directories.
Click to hide internal directories.