Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FinishAuthorizeRequest ¶
FinishAuthorizeRequest validates code value and tries to find user.
func HandleAuthorizeRequest ¶
HandleAuthorizeRequest generates authorization URL for specified service.
func HandleService ¶
HandleService validates that service name is valid and allowed.
func ValidateAuthorizeRequest ¶
ValidateAuthorizeRequest validates that state value is valid.
Types ¶
type Config ¶
type Config struct { ClientID string ClientSecret string RedirectURL string Scopes []string Endpoint Endpoint }
Config describes a typical 3-legged OAuth2 flow, with both the client application information and the server's endpoint URLs.
func (*Config) AuthCodeURL ¶
AuthCodeURL constructs authorization url according to the config.
type Endpoint ¶
Endpoint contains the OAuth 2.0 provider's authorization, token and user endpoint URLs.
Click to show internal directories.
Click to hide internal directories.