Documentation ¶
Index ¶
- type Adapter
- func NewGenericOIDCAdapter(clientID, clientSecret, endpointURL string) Adapter
- func NewGithubAdapter(clientID, clientSecret, endpointURL string) Adapter
- func NewGoogleAdapter(clientID, clientSecret string) Adapter
- func NewMicrosoftAdapter(clientID, clientSecret string) Adapter
- func NewOktaAdapter(clientID, clientSecret, endpointURL string) Adapter
- type AdapterWrapper
- type JWTClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { GetRedirectURL(state string) string GetUserData(state, code string) (*user, error) GetOAuthProviderName() string }
Adapter will be implemented by each oAuth provider
func NewGenericOIDCAdapter ¶
NewGenericOIDCAdapter creates an oAuth adapter out of the credentials and the baseURL
func NewGithubAdapter ¶
NewGithubAdapter creates an oAuth adapter out of the credentials and the baseURL
func NewGoogleAdapter ¶
NewGoogleAdapter creates an oAuth adapter out of the credentials and the baseURL
func NewMicrosoftAdapter ¶
NewMicrosoftAdapter creates an oAuth adapter out of the credentials and the baseURL
func NewOktaAdapter ¶
NewOktaAdapter creates an oAuth adapter out of the credentials and the baseURL
type AdapterWrapper ¶
type AdapterWrapper struct{ Adapter }
AdapterWrapper wraps an normal oAuth Adapter with some generic functions to be implemented directly by the gin router
func WithAdapterWrapper ¶
func WithAdapterWrapper(a Adapter, h *gin.RouterGroup) *AdapterWrapper
WithAdapterWrapper creates an adapterWrapper out of the oAuth Adapter and an gin.RouterGroup
func (*AdapterWrapper) HandleCallback ¶
func (a *AdapterWrapper) HandleCallback(c *gin.Context)
HandleCallback handles and validates the callback which is coming back from the oAuth request
func (*AdapterWrapper) HandleLogin ¶
func (a *AdapterWrapper) HandleLogin(c *gin.Context)
HandleLogin handles the incoming http request for the oAuth process and redirects to the generated URL of the provider