Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleOAuthProvider ¶
func NewGoogleOAuthProvider ¶
func NewGoogleOAuthProvider(clientID string, clientSecret string, redirectURL string, scopes []string) *GoogleOAuthProvider
func (*GoogleOAuthProvider) ExchangeCodeForToken ¶
func (*GoogleOAuthProvider) GetAuthorizationURL ¶
func (p *GoogleOAuthProvider) GetAuthorizationURL(state string) string
func (*GoogleOAuthProvider) GetUserInfo ¶
func (p *GoogleOAuthProvider) GetUserInfo(token *oauth2.Token) (interface{}, error)
type GoogleUserInfo ¶
type KeycloakProvider ¶
type KeycloakProvider struct {
// contains filtered or unexported fields
}
func NewKeycloakProvider ¶
func NewKeycloakProvider(clientID, clientSecret, redirectURI, authURL, tokenURL, userinfoURL string) *KeycloakProvider
func (*KeycloakProvider) ExchangeCodeForToken ¶
func (*KeycloakProvider) GetAuthorizationURL ¶
func (kp *KeycloakProvider) GetAuthorizationURL(state string) string
func (*KeycloakProvider) GetUserInfo ¶
func (kp *KeycloakProvider) GetUserInfo(token *oauth2.Token) (interface{}, error)
type OAuthProvider ¶
type OAuthProvider interface { // GetAuthorizationURL returns the URL to redirect the user to for authentication GetAuthorizationURL(state string) string // ExchangeCodeForToken exchanges the authorization code received from the OAuth provider for an access token ExchangeCodeForToken(code string, state string) (*oauth2.Token, error) // GetUserInfo returns the user information associated with the access token GetUserInfo(token *oauth2.Token) (interface{}, error) }
Click to show internal directories.
Click to hide internal directories.