Documentation ¶
Index ¶
- Constants
- type Apple
- func (p Apple) AuthUrl() string
- func (p Apple) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Apple) Client(token *oauth2.Token) *http.Client
- func (p Apple) ClientId() string
- func (p Apple) ClientSecret() string
- func (p Apple) Context() context.Context
- func (p Apple) DisplayName() string
- func (p *Apple) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p *Apple) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Apple) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Apple) PKCE() bool
- func (p Apple) RedirectUrl() string
- func (p Apple) Scopes() []string
- func (p Apple) SetAuthUrl(url string)
- func (p Apple) SetClientId(clientId string)
- func (p Apple) SetClientSecret(secret string)
- func (p Apple) SetContext(ctx context.Context)
- func (p Apple) SetDisplayName(displayName string)
- func (p Apple) SetPKCE(enable bool)
- func (p Apple) SetRedirectUrl(url string)
- func (p Apple) SetScopes(scopes []string)
- func (p Apple) SetTokenUrl(url string)
- func (p Apple) SetUserApiUrl(url string)
- func (p Apple) TokenUrl() string
- func (p Apple) UserApiUrl() string
- type AuthUser
- type Bitbucket
- func (p Bitbucket) AuthUrl() string
- func (p Bitbucket) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Bitbucket) Client(token *oauth2.Token) *http.Client
- func (p Bitbucket) ClientId() string
- func (p Bitbucket) ClientSecret() string
- func (p Bitbucket) Context() context.Context
- func (p Bitbucket) DisplayName() string
- func (p *Bitbucket) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Bitbucket) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Bitbucket) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Bitbucket) PKCE() bool
- func (p Bitbucket) RedirectUrl() string
- func (p Bitbucket) Scopes() []string
- func (p Bitbucket) SetAuthUrl(url string)
- func (p Bitbucket) SetClientId(clientId string)
- func (p Bitbucket) SetClientSecret(secret string)
- func (p Bitbucket) SetContext(ctx context.Context)
- func (p Bitbucket) SetDisplayName(displayName string)
- func (p Bitbucket) SetPKCE(enable bool)
- func (p Bitbucket) SetRedirectUrl(url string)
- func (p Bitbucket) SetScopes(scopes []string)
- func (p Bitbucket) SetTokenUrl(url string)
- func (p Bitbucket) SetUserApiUrl(url string)
- func (p Bitbucket) TokenUrl() string
- func (p Bitbucket) UserApiUrl() string
- type Discord
- func (p Discord) AuthUrl() string
- func (p Discord) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Discord) Client(token *oauth2.Token) *http.Client
- func (p Discord) ClientId() string
- func (p Discord) ClientSecret() string
- func (p Discord) Context() context.Context
- func (p Discord) DisplayName() string
- func (p *Discord) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Discord) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Discord) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Discord) PKCE() bool
- func (p Discord) RedirectUrl() string
- func (p Discord) Scopes() []string
- func (p Discord) SetAuthUrl(url string)
- func (p Discord) SetClientId(clientId string)
- func (p Discord) SetClientSecret(secret string)
- func (p Discord) SetContext(ctx context.Context)
- func (p Discord) SetDisplayName(displayName string)
- func (p Discord) SetPKCE(enable bool)
- func (p Discord) SetRedirectUrl(url string)
- func (p Discord) SetScopes(scopes []string)
- func (p Discord) SetTokenUrl(url string)
- func (p Discord) SetUserApiUrl(url string)
- func (p Discord) TokenUrl() string
- func (p Discord) UserApiUrl() string
- type Facebook
- func (p Facebook) AuthUrl() string
- func (p Facebook) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Facebook) Client(token *oauth2.Token) *http.Client
- func (p Facebook) ClientId() string
- func (p Facebook) ClientSecret() string
- func (p Facebook) Context() context.Context
- func (p Facebook) DisplayName() string
- func (p *Facebook) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Facebook) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Facebook) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Facebook) PKCE() bool
- func (p Facebook) RedirectUrl() string
- func (p Facebook) Scopes() []string
- func (p Facebook) SetAuthUrl(url string)
- func (p Facebook) SetClientId(clientId string)
- func (p Facebook) SetClientSecret(secret string)
- func (p Facebook) SetContext(ctx context.Context)
- func (p Facebook) SetDisplayName(displayName string)
- func (p Facebook) SetPKCE(enable bool)
- func (p Facebook) SetRedirectUrl(url string)
- func (p Facebook) SetScopes(scopes []string)
- func (p Facebook) SetTokenUrl(url string)
- func (p Facebook) SetUserApiUrl(url string)
- func (p Facebook) TokenUrl() string
- func (p Facebook) UserApiUrl() string
- type Gitea
- func (p Gitea) AuthUrl() string
- func (p Gitea) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Gitea) Client(token *oauth2.Token) *http.Client
- func (p Gitea) ClientId() string
- func (p Gitea) ClientSecret() string
- func (p Gitea) Context() context.Context
- func (p Gitea) DisplayName() string
- func (p *Gitea) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Gitea) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Gitea) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Gitea) PKCE() bool
- func (p Gitea) RedirectUrl() string
- func (p Gitea) Scopes() []string
- func (p Gitea) SetAuthUrl(url string)
- func (p Gitea) SetClientId(clientId string)
- func (p Gitea) SetClientSecret(secret string)
- func (p Gitea) SetContext(ctx context.Context)
- func (p Gitea) SetDisplayName(displayName string)
- func (p Gitea) SetPKCE(enable bool)
- func (p Gitea) SetRedirectUrl(url string)
- func (p Gitea) SetScopes(scopes []string)
- func (p Gitea) SetTokenUrl(url string)
- func (p Gitea) SetUserApiUrl(url string)
- func (p Gitea) TokenUrl() string
- func (p Gitea) UserApiUrl() string
- type Gitee
- func (p Gitee) AuthUrl() string
- func (p Gitee) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Gitee) Client(token *oauth2.Token) *http.Client
- func (p Gitee) ClientId() string
- func (p Gitee) ClientSecret() string
- func (p Gitee) Context() context.Context
- func (p Gitee) DisplayName() string
- func (p *Gitee) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Gitee) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Gitee) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Gitee) PKCE() bool
- func (p Gitee) RedirectUrl() string
- func (p Gitee) Scopes() []string
- func (p Gitee) SetAuthUrl(url string)
- func (p Gitee) SetClientId(clientId string)
- func (p Gitee) SetClientSecret(secret string)
- func (p Gitee) SetContext(ctx context.Context)
- func (p Gitee) SetDisplayName(displayName string)
- func (p Gitee) SetPKCE(enable bool)
- func (p Gitee) SetRedirectUrl(url string)
- func (p Gitee) SetScopes(scopes []string)
- func (p Gitee) SetTokenUrl(url string)
- func (p Gitee) SetUserApiUrl(url string)
- func (p Gitee) TokenUrl() string
- func (p Gitee) UserApiUrl() string
- type Github
- func (p Github) AuthUrl() string
- func (p Github) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Github) Client(token *oauth2.Token) *http.Client
- func (p Github) ClientId() string
- func (p Github) ClientSecret() string
- func (p Github) Context() context.Context
- func (p Github) DisplayName() string
- func (p *Github) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Github) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Github) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Github) PKCE() bool
- func (p Github) RedirectUrl() string
- func (p Github) Scopes() []string
- func (p Github) SetAuthUrl(url string)
- func (p Github) SetClientId(clientId string)
- func (p Github) SetClientSecret(secret string)
- func (p Github) SetContext(ctx context.Context)
- func (p Github) SetDisplayName(displayName string)
- func (p Github) SetPKCE(enable bool)
- func (p Github) SetRedirectUrl(url string)
- func (p Github) SetScopes(scopes []string)
- func (p Github) SetTokenUrl(url string)
- func (p Github) SetUserApiUrl(url string)
- func (p Github) TokenUrl() string
- func (p Github) UserApiUrl() string
- type Gitlab
- func (p Gitlab) AuthUrl() string
- func (p Gitlab) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Gitlab) Client(token *oauth2.Token) *http.Client
- func (p Gitlab) ClientId() string
- func (p Gitlab) ClientSecret() string
- func (p Gitlab) Context() context.Context
- func (p Gitlab) DisplayName() string
- func (p *Gitlab) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Gitlab) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Gitlab) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Gitlab) PKCE() bool
- func (p Gitlab) RedirectUrl() string
- func (p Gitlab) Scopes() []string
- func (p Gitlab) SetAuthUrl(url string)
- func (p Gitlab) SetClientId(clientId string)
- func (p Gitlab) SetClientSecret(secret string)
- func (p Gitlab) SetContext(ctx context.Context)
- func (p Gitlab) SetDisplayName(displayName string)
- func (p Gitlab) SetPKCE(enable bool)
- func (p Gitlab) SetRedirectUrl(url string)
- func (p Gitlab) SetScopes(scopes []string)
- func (p Gitlab) SetTokenUrl(url string)
- func (p Gitlab) SetUserApiUrl(url string)
- func (p Gitlab) TokenUrl() string
- func (p Gitlab) UserApiUrl() string
- type Google
- func (p Google) AuthUrl() string
- func (p Google) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Google) Client(token *oauth2.Token) *http.Client
- func (p Google) ClientId() string
- func (p Google) ClientSecret() string
- func (p Google) Context() context.Context
- func (p Google) DisplayName() string
- func (p *Google) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Google) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Google) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Google) PKCE() bool
- func (p Google) RedirectUrl() string
- func (p Google) Scopes() []string
- func (p Google) SetAuthUrl(url string)
- func (p Google) SetClientId(clientId string)
- func (p Google) SetClientSecret(secret string)
- func (p Google) SetContext(ctx context.Context)
- func (p Google) SetDisplayName(displayName string)
- func (p Google) SetPKCE(enable bool)
- func (p Google) SetRedirectUrl(url string)
- func (p Google) SetScopes(scopes []string)
- func (p Google) SetTokenUrl(url string)
- func (p Google) SetUserApiUrl(url string)
- func (p Google) TokenUrl() string
- func (p Google) UserApiUrl() string
- type Instagram
- func (p Instagram) AuthUrl() string
- func (p Instagram) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Instagram) Client(token *oauth2.Token) *http.Client
- func (p Instagram) ClientId() string
- func (p Instagram) ClientSecret() string
- func (p Instagram) Context() context.Context
- func (p Instagram) DisplayName() string
- func (p *Instagram) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Instagram) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Instagram) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Instagram) PKCE() bool
- func (p Instagram) RedirectUrl() string
- func (p Instagram) Scopes() []string
- func (p Instagram) SetAuthUrl(url string)
- func (p Instagram) SetClientId(clientId string)
- func (p Instagram) SetClientSecret(secret string)
- func (p Instagram) SetContext(ctx context.Context)
- func (p Instagram) SetDisplayName(displayName string)
- func (p Instagram) SetPKCE(enable bool)
- func (p Instagram) SetRedirectUrl(url string)
- func (p Instagram) SetScopes(scopes []string)
- func (p Instagram) SetTokenUrl(url string)
- func (p Instagram) SetUserApiUrl(url string)
- func (p Instagram) TokenUrl() string
- func (p Instagram) UserApiUrl() string
- type Kakao
- func (p Kakao) AuthUrl() string
- func (p Kakao) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Kakao) Client(token *oauth2.Token) *http.Client
- func (p Kakao) ClientId() string
- func (p Kakao) ClientSecret() string
- func (p Kakao) Context() context.Context
- func (p Kakao) DisplayName() string
- func (p *Kakao) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Kakao) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Kakao) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Kakao) PKCE() bool
- func (p Kakao) RedirectUrl() string
- func (p Kakao) Scopes() []string
- func (p Kakao) SetAuthUrl(url string)
- func (p Kakao) SetClientId(clientId string)
- func (p Kakao) SetClientSecret(secret string)
- func (p Kakao) SetContext(ctx context.Context)
- func (p Kakao) SetDisplayName(displayName string)
- func (p Kakao) SetPKCE(enable bool)
- func (p Kakao) SetRedirectUrl(url string)
- func (p Kakao) SetScopes(scopes []string)
- func (p Kakao) SetTokenUrl(url string)
- func (p Kakao) SetUserApiUrl(url string)
- func (p Kakao) TokenUrl() string
- func (p Kakao) UserApiUrl() string
- type Livechat
- func (p Livechat) AuthUrl() string
- func (p Livechat) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Livechat) Client(token *oauth2.Token) *http.Client
- func (p Livechat) ClientId() string
- func (p Livechat) ClientSecret() string
- func (p Livechat) Context() context.Context
- func (p Livechat) DisplayName() string
- func (p *Livechat) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Livechat) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Livechat) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Livechat) PKCE() bool
- func (p Livechat) RedirectUrl() string
- func (p Livechat) Scopes() []string
- func (p Livechat) SetAuthUrl(url string)
- func (p Livechat) SetClientId(clientId string)
- func (p Livechat) SetClientSecret(secret string)
- func (p Livechat) SetContext(ctx context.Context)
- func (p Livechat) SetDisplayName(displayName string)
- func (p Livechat) SetPKCE(enable bool)
- func (p Livechat) SetRedirectUrl(url string)
- func (p Livechat) SetScopes(scopes []string)
- func (p Livechat) SetTokenUrl(url string)
- func (p Livechat) SetUserApiUrl(url string)
- func (p Livechat) TokenUrl() string
- func (p Livechat) UserApiUrl() string
- type Mailcow
- func (p Mailcow) AuthUrl() string
- func (p Mailcow) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Mailcow) Client(token *oauth2.Token) *http.Client
- func (p Mailcow) ClientId() string
- func (p Mailcow) ClientSecret() string
- func (p Mailcow) Context() context.Context
- func (p Mailcow) DisplayName() string
- func (p *Mailcow) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Mailcow) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Mailcow) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Mailcow) PKCE() bool
- func (p Mailcow) RedirectUrl() string
- func (p Mailcow) Scopes() []string
- func (p Mailcow) SetAuthUrl(url string)
- func (p Mailcow) SetClientId(clientId string)
- func (p Mailcow) SetClientSecret(secret string)
- func (p Mailcow) SetContext(ctx context.Context)
- func (p Mailcow) SetDisplayName(displayName string)
- func (p Mailcow) SetPKCE(enable bool)
- func (p Mailcow) SetRedirectUrl(url string)
- func (p Mailcow) SetScopes(scopes []string)
- func (p Mailcow) SetTokenUrl(url string)
- func (p Mailcow) SetUserApiUrl(url string)
- func (p Mailcow) TokenUrl() string
- func (p Mailcow) UserApiUrl() string
- type Microsoft
- func (p Microsoft) AuthUrl() string
- func (p Microsoft) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Microsoft) Client(token *oauth2.Token) *http.Client
- func (p Microsoft) ClientId() string
- func (p Microsoft) ClientSecret() string
- func (p Microsoft) Context() context.Context
- func (p Microsoft) DisplayName() string
- func (p *Microsoft) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Microsoft) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Microsoft) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Microsoft) PKCE() bool
- func (p Microsoft) RedirectUrl() string
- func (p Microsoft) Scopes() []string
- func (p Microsoft) SetAuthUrl(url string)
- func (p Microsoft) SetClientId(clientId string)
- func (p Microsoft) SetClientSecret(secret string)
- func (p Microsoft) SetContext(ctx context.Context)
- func (p Microsoft) SetDisplayName(displayName string)
- func (p Microsoft) SetPKCE(enable bool)
- func (p Microsoft) SetRedirectUrl(url string)
- func (p Microsoft) SetScopes(scopes []string)
- func (p Microsoft) SetTokenUrl(url string)
- func (p Microsoft) SetUserApiUrl(url string)
- func (p Microsoft) TokenUrl() string
- func (p Microsoft) UserApiUrl() string
- type OIDC
- func (p OIDC) AuthUrl() string
- func (p OIDC) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p OIDC) Client(token *oauth2.Token) *http.Client
- func (p OIDC) ClientId() string
- func (p OIDC) ClientSecret() string
- func (p OIDC) Context() context.Context
- func (p OIDC) DisplayName() string
- func (p *OIDC) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p OIDC) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p OIDC) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p OIDC) PKCE() bool
- func (p OIDC) RedirectUrl() string
- func (p OIDC) Scopes() []string
- func (p OIDC) SetAuthUrl(url string)
- func (p OIDC) SetClientId(clientId string)
- func (p OIDC) SetClientSecret(secret string)
- func (p OIDC) SetContext(ctx context.Context)
- func (p OIDC) SetDisplayName(displayName string)
- func (p OIDC) SetPKCE(enable bool)
- func (p OIDC) SetRedirectUrl(url string)
- func (p OIDC) SetScopes(scopes []string)
- func (p OIDC) SetTokenUrl(url string)
- func (p OIDC) SetUserApiUrl(url string)
- func (p OIDC) TokenUrl() string
- func (p OIDC) UserApiUrl() string
- type Patreon
- func (p Patreon) AuthUrl() string
- func (p Patreon) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Patreon) Client(token *oauth2.Token) *http.Client
- func (p Patreon) ClientId() string
- func (p Patreon) ClientSecret() string
- func (p Patreon) Context() context.Context
- func (p Patreon) DisplayName() string
- func (p *Patreon) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Patreon) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Patreon) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Patreon) PKCE() bool
- func (p Patreon) RedirectUrl() string
- func (p Patreon) Scopes() []string
- func (p Patreon) SetAuthUrl(url string)
- func (p Patreon) SetClientId(clientId string)
- func (p Patreon) SetClientSecret(secret string)
- func (p Patreon) SetContext(ctx context.Context)
- func (p Patreon) SetDisplayName(displayName string)
- func (p Patreon) SetPKCE(enable bool)
- func (p Patreon) SetRedirectUrl(url string)
- func (p Patreon) SetScopes(scopes []string)
- func (p Patreon) SetTokenUrl(url string)
- func (p Patreon) SetUserApiUrl(url string)
- func (p Patreon) TokenUrl() string
- func (p Patreon) UserApiUrl() string
- type Planningcenter
- func (p Planningcenter) AuthUrl() string
- func (p Planningcenter) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Planningcenter) Client(token *oauth2.Token) *http.Client
- func (p Planningcenter) ClientId() string
- func (p Planningcenter) ClientSecret() string
- func (p Planningcenter) Context() context.Context
- func (p Planningcenter) DisplayName() string
- func (p *Planningcenter) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Planningcenter) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Planningcenter) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Planningcenter) PKCE() bool
- func (p Planningcenter) RedirectUrl() string
- func (p Planningcenter) Scopes() []string
- func (p Planningcenter) SetAuthUrl(url string)
- func (p Planningcenter) SetClientId(clientId string)
- func (p Planningcenter) SetClientSecret(secret string)
- func (p Planningcenter) SetContext(ctx context.Context)
- func (p Planningcenter) SetDisplayName(displayName string)
- func (p Planningcenter) SetPKCE(enable bool)
- func (p Planningcenter) SetRedirectUrl(url string)
- func (p Planningcenter) SetScopes(scopes []string)
- func (p Planningcenter) SetTokenUrl(url string)
- func (p Planningcenter) SetUserApiUrl(url string)
- func (p Planningcenter) TokenUrl() string
- func (p Planningcenter) UserApiUrl() string
- type Provider
- type Spotify
- func (p Spotify) AuthUrl() string
- func (p Spotify) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Spotify) Client(token *oauth2.Token) *http.Client
- func (p Spotify) ClientId() string
- func (p Spotify) ClientSecret() string
- func (p Spotify) Context() context.Context
- func (p Spotify) DisplayName() string
- func (p *Spotify) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Spotify) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Spotify) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Spotify) PKCE() bool
- func (p Spotify) RedirectUrl() string
- func (p Spotify) Scopes() []string
- func (p Spotify) SetAuthUrl(url string)
- func (p Spotify) SetClientId(clientId string)
- func (p Spotify) SetClientSecret(secret string)
- func (p Spotify) SetContext(ctx context.Context)
- func (p Spotify) SetDisplayName(displayName string)
- func (p Spotify) SetPKCE(enable bool)
- func (p Spotify) SetRedirectUrl(url string)
- func (p Spotify) SetScopes(scopes []string)
- func (p Spotify) SetTokenUrl(url string)
- func (p Spotify) SetUserApiUrl(url string)
- func (p Spotify) TokenUrl() string
- func (p Spotify) UserApiUrl() string
- type Strava
- func (p Strava) AuthUrl() string
- func (p Strava) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Strava) Client(token *oauth2.Token) *http.Client
- func (p Strava) ClientId() string
- func (p Strava) ClientSecret() string
- func (p Strava) Context() context.Context
- func (p Strava) DisplayName() string
- func (p *Strava) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Strava) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Strava) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Strava) PKCE() bool
- func (p Strava) RedirectUrl() string
- func (p Strava) Scopes() []string
- func (p Strava) SetAuthUrl(url string)
- func (p Strava) SetClientId(clientId string)
- func (p Strava) SetClientSecret(secret string)
- func (p Strava) SetContext(ctx context.Context)
- func (p Strava) SetDisplayName(displayName string)
- func (p Strava) SetPKCE(enable bool)
- func (p Strava) SetRedirectUrl(url string)
- func (p Strava) SetScopes(scopes []string)
- func (p Strava) SetTokenUrl(url string)
- func (p Strava) SetUserApiUrl(url string)
- func (p Strava) TokenUrl() string
- func (p Strava) UserApiUrl() string
- type Twitch
- func (p Twitch) AuthUrl() string
- func (p Twitch) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Twitch) Client(token *oauth2.Token) *http.Client
- func (p Twitch) ClientId() string
- func (p Twitch) ClientSecret() string
- func (p Twitch) Context() context.Context
- func (p Twitch) DisplayName() string
- func (p *Twitch) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p *Twitch) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Twitch) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Twitch) PKCE() bool
- func (p Twitch) RedirectUrl() string
- func (p Twitch) Scopes() []string
- func (p Twitch) SetAuthUrl(url string)
- func (p Twitch) SetClientId(clientId string)
- func (p Twitch) SetClientSecret(secret string)
- func (p Twitch) SetContext(ctx context.Context)
- func (p Twitch) SetDisplayName(displayName string)
- func (p Twitch) SetPKCE(enable bool)
- func (p Twitch) SetRedirectUrl(url string)
- func (p Twitch) SetScopes(scopes []string)
- func (p Twitch) SetTokenUrl(url string)
- func (p Twitch) SetUserApiUrl(url string)
- func (p Twitch) TokenUrl() string
- func (p Twitch) UserApiUrl() string
- type Twitter
- func (p Twitter) AuthUrl() string
- func (p Twitter) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Twitter) Client(token *oauth2.Token) *http.Client
- func (p Twitter) ClientId() string
- func (p Twitter) ClientSecret() string
- func (p Twitter) Context() context.Context
- func (p Twitter) DisplayName() string
- func (p *Twitter) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Twitter) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Twitter) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Twitter) PKCE() bool
- func (p Twitter) RedirectUrl() string
- func (p Twitter) Scopes() []string
- func (p Twitter) SetAuthUrl(url string)
- func (p Twitter) SetClientId(clientId string)
- func (p Twitter) SetClientSecret(secret string)
- func (p Twitter) SetContext(ctx context.Context)
- func (p Twitter) SetDisplayName(displayName string)
- func (p Twitter) SetPKCE(enable bool)
- func (p Twitter) SetRedirectUrl(url string)
- func (p Twitter) SetScopes(scopes []string)
- func (p Twitter) SetTokenUrl(url string)
- func (p Twitter) SetUserApiUrl(url string)
- func (p Twitter) TokenUrl() string
- func (p Twitter) UserApiUrl() string
- type VK
- func (p VK) AuthUrl() string
- func (p VK) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p VK) Client(token *oauth2.Token) *http.Client
- func (p VK) ClientId() string
- func (p VK) ClientSecret() string
- func (p VK) Context() context.Context
- func (p VK) DisplayName() string
- func (p *VK) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p VK) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p VK) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p VK) PKCE() bool
- func (p VK) RedirectUrl() string
- func (p VK) Scopes() []string
- func (p VK) SetAuthUrl(url string)
- func (p VK) SetClientId(clientId string)
- func (p VK) SetClientSecret(secret string)
- func (p VK) SetContext(ctx context.Context)
- func (p VK) SetDisplayName(displayName string)
- func (p VK) SetPKCE(enable bool)
- func (p VK) SetRedirectUrl(url string)
- func (p VK) SetScopes(scopes []string)
- func (p VK) SetTokenUrl(url string)
- func (p VK) SetUserApiUrl(url string)
- func (p VK) TokenUrl() string
- func (p VK) UserApiUrl() string
- type Yandex
- func (p Yandex) AuthUrl() string
- func (p Yandex) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
- func (p Yandex) Client(token *oauth2.Token) *http.Client
- func (p Yandex) ClientId() string
- func (p Yandex) ClientSecret() string
- func (p Yandex) Context() context.Context
- func (p Yandex) DisplayName() string
- func (p *Yandex) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
- func (p Yandex) FetchRawUserData(token *oauth2.Token) ([]byte, error)
- func (p Yandex) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (p Yandex) PKCE() bool
- func (p Yandex) RedirectUrl() string
- func (p Yandex) Scopes() []string
- func (p Yandex) SetAuthUrl(url string)
- func (p Yandex) SetClientId(clientId string)
- func (p Yandex) SetClientSecret(secret string)
- func (p Yandex) SetContext(ctx context.Context)
- func (p Yandex) SetDisplayName(displayName string)
- func (p Yandex) SetPKCE(enable bool)
- func (p Yandex) SetRedirectUrl(url string)
- func (p Yandex) SetScopes(scopes []string)
- func (p Yandex) SetTokenUrl(url string)
- func (p Yandex) SetUserApiUrl(url string)
- func (p Yandex) TokenUrl() string
- func (p Yandex) UserApiUrl() string
Constants ¶
const NameApple string = "apple"
NameApple is the unique name of the Apple provider.
const NameBitbucket = "bitbucket"
NameBitbucket is the unique name of the Bitbucket provider.
const NameDiscord string = "discord"
NameDiscord is the unique name of the Discord provider.
const NameFacebook string = "facebook"
NameFacebook is the unique name of the Facebook provider.
const NameGitea string = "gitea"
NameGitea is the unique name of the Gitea provider.
const NameGitee string = "gitee"
NameGitee is the unique name of the Gitee provider.
const NameGithub string = "github"
NameGithub is the unique name of the Github provider.
const NameGitlab string = "gitlab"
NameGitlab is the unique name of the Gitlab provider.
const NameGoogle string = "google"
NameGoogle is the unique name of the Google provider.
const NameInstagram string = "instagram"
NameInstagram is the unique name of the Instagram provider.
const NameKakao string = "kakao"
NameKakao is the unique name of the Kakao provider.
const NameLivechat = "livechat"
NameLivechat is the unique name of the Livechat provider.
const NameMailcow string = "mailcow"
NameMailcow is the unique name of the mailcow provider.
const NameMicrosoft string = "microsoft"
NameMicrosoft is the unique name of the Microsoft provider.
const NameOIDC string = "oidc"
NameOIDC is the unique name of the OpenID Connect (OIDC) provider.
const NamePatreon string = "patreon"
NamePatreon is the unique name of the Patreon provider.
const NamePlanningcenter string = "planningcenter"
NamePlanningcenter is the unique name of the Planningcenter provider.
const NameSpotify string = "spotify"
NameSpotify is the unique name of the Spotify provider.
const NameStrava string = "strava"
NameStrava is the unique name of the Strava provider.
const NameTwitch string = "twitch"
NameTwitch is the unique name of the Twitch provider.
const NameTwitter string = "twitter"
NameTwitter is the unique name of the Twitter provider.
const NameVK string = "vk"
NameVK is the unique name of the VK provider.
const NameYandex string = "yandex"
NameYandex is the unique name of the Yandex provider.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Apple ¶
type Apple struct {
// contains filtered or unexported fields
}
Apple allows authentication via Apple OAuth2.
func NewAppleProvider ¶
func NewAppleProvider() *Apple
NewAppleProvider creates a new Apple provider instance with some defaults.
func (Apple) AuthUrl ¶
func (p Apple) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Apple) BuildAuthUrl ¶
func (p Apple) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Apple) ClientId ¶
func (p Apple) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Apple) ClientSecret ¶
func (p Apple) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Apple) DisplayName ¶
func (p Apple) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Apple) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on the provided token.
API reference: https://developer.apple.com/documentation/sign_in_with_apple/tokenresponse.
func (*Apple) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData interface.
Apple doesn't have a UserInfo endpoint and claims about users are instead included in the "id_token" (https://openid.net/specs/openid-connect-core-1_0.html#id_tokenExample)
func (Apple) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Apple) RedirectUrl ¶
func (p Apple) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Apple) Scopes ¶
func (p Apple) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Apple) SetAuthUrl ¶
func (p Apple) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Apple) SetClientId ¶
func (p Apple) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Apple) SetClientSecret ¶
func (p Apple) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Apple) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Apple) SetDisplayName ¶
func (p Apple) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Apple) SetPKCE ¶
func (p Apple) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Apple) SetRedirectUrl ¶
func (p Apple) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Apple) SetScopes ¶
func (p Apple) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Apple) SetTokenUrl ¶
func (p Apple) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Apple) SetUserApiUrl ¶
func (p Apple) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Apple) TokenUrl ¶
func (p Apple) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Apple) UserApiUrl ¶
func (p Apple) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type AuthUser ¶
type AuthUser struct { Id string `json:"id"` Name string `json:"name"` Username string `json:"username"` Email string `json:"email"` AvatarUrl string `json:"avatarUrl"` AccessToken string `json:"accessToken"` RefreshToken string `json:"refreshToken"` Expiry types.DateTime `json:"expiry"` RawUser map[string]any `json:"rawUser"` }
AuthUser defines a standardized oauth2 user data structure.
type Bitbucket ¶
type Bitbucket struct {
// contains filtered or unexported fields
}
Bitbucket is an auth provider for Bitbucket.
func NewBitbucketProvider ¶
func NewBitbucketProvider() *Bitbucket
NewBitbucketProvider creates a new Bitbucket provider instance with some defaults.
func (Bitbucket) AuthUrl ¶
func (p Bitbucket) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Bitbucket) BuildAuthUrl ¶
func (p Bitbucket) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Bitbucket) ClientId ¶
func (p Bitbucket) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Bitbucket) ClientSecret ¶
func (p Bitbucket) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Bitbucket) DisplayName ¶
func (p Bitbucket) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Bitbucket) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on the Bitbucket's user API.
API reference: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-users/#api-user-get
func (Bitbucket) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Bitbucket) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Bitbucket) PKCE ¶
func (p Bitbucket) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Bitbucket) RedirectUrl ¶
func (p Bitbucket) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Bitbucket) Scopes ¶
func (p Bitbucket) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Bitbucket) SetAuthUrl ¶
func (p Bitbucket) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Bitbucket) SetClientId ¶
func (p Bitbucket) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Bitbucket) SetClientSecret ¶
func (p Bitbucket) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Bitbucket) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Bitbucket) SetDisplayName ¶
func (p Bitbucket) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Bitbucket) SetPKCE ¶
func (p Bitbucket) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Bitbucket) SetRedirectUrl ¶
func (p Bitbucket) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Bitbucket) SetScopes ¶
func (p Bitbucket) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Bitbucket) SetTokenUrl ¶
func (p Bitbucket) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Bitbucket) SetUserApiUrl ¶
func (p Bitbucket) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Bitbucket) TokenUrl ¶
func (p Bitbucket) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Bitbucket) UserApiUrl ¶
func (p Bitbucket) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Discord ¶
type Discord struct {
// contains filtered or unexported fields
}
Discord allows authentication via Discord OAuth2.
func NewDiscordProvider ¶
func NewDiscordProvider() *Discord
NewDiscordProvider creates a new Discord provider instance with some defaults.
func (Discord) AuthUrl ¶
func (p Discord) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Discord) BuildAuthUrl ¶
func (p Discord) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Discord) ClientId ¶
func (p Discord) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Discord) ClientSecret ¶
func (p Discord) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Discord) DisplayName ¶
func (p Discord) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Discord) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance from Discord's user api.
API reference: https://discord.com/developers/docs/resources/user#user-object
func (Discord) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Discord) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Discord) PKCE ¶
func (p Discord) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Discord) RedirectUrl ¶
func (p Discord) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Discord) Scopes ¶
func (p Discord) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Discord) SetAuthUrl ¶
func (p Discord) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Discord) SetClientId ¶
func (p Discord) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Discord) SetClientSecret ¶
func (p Discord) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Discord) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Discord) SetDisplayName ¶
func (p Discord) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Discord) SetPKCE ¶
func (p Discord) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Discord) SetRedirectUrl ¶
func (p Discord) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Discord) SetScopes ¶
func (p Discord) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Discord) SetTokenUrl ¶
func (p Discord) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Discord) SetUserApiUrl ¶
func (p Discord) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Discord) TokenUrl ¶
func (p Discord) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Discord) UserApiUrl ¶
func (p Discord) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Facebook ¶
type Facebook struct {
// contains filtered or unexported fields
}
Facebook allows authentication via Facebook OAuth2.
func NewFacebookProvider ¶
func NewFacebookProvider() *Facebook
NewFacebookProvider creates new Facebook provider instance with some defaults.
func (Facebook) AuthUrl ¶
func (p Facebook) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Facebook) BuildAuthUrl ¶
func (p Facebook) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Facebook) ClientId ¶
func (p Facebook) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Facebook) ClientSecret ¶
func (p Facebook) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Facebook) DisplayName ¶
func (p Facebook) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Facebook) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on the Facebook's user api.
API reference: https://developers.facebook.com/docs/graph-api/reference/user/
func (Facebook) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Facebook) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Facebook) PKCE ¶
func (p Facebook) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Facebook) RedirectUrl ¶
func (p Facebook) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Facebook) Scopes ¶
func (p Facebook) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Facebook) SetAuthUrl ¶
func (p Facebook) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Facebook) SetClientId ¶
func (p Facebook) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Facebook) SetClientSecret ¶
func (p Facebook) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Facebook) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Facebook) SetDisplayName ¶
func (p Facebook) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Facebook) SetPKCE ¶
func (p Facebook) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Facebook) SetRedirectUrl ¶
func (p Facebook) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Facebook) SetScopes ¶
func (p Facebook) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Facebook) SetTokenUrl ¶
func (p Facebook) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Facebook) SetUserApiUrl ¶
func (p Facebook) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Facebook) TokenUrl ¶
func (p Facebook) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Facebook) UserApiUrl ¶
func (p Facebook) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Gitea ¶
type Gitea struct {
// contains filtered or unexported fields
}
Gitea allows authentication via Gitea OAuth2.
func NewGiteaProvider ¶
func NewGiteaProvider() *Gitea
NewGiteaProvider creates new Gitea provider instance with some defaults.
func (Gitea) AuthUrl ¶
func (p Gitea) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Gitea) BuildAuthUrl ¶
func (p Gitea) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Gitea) ClientId ¶
func (p Gitea) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Gitea) ClientSecret ¶
func (p Gitea) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Gitea) DisplayName ¶
func (p Gitea) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Gitea) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on Gitea's user api.
API reference: https://try.gitea.io/api/swagger#/user/userGetCurrent
func (Gitea) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Gitea) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Gitea) RedirectUrl ¶
func (p Gitea) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Gitea) Scopes ¶
func (p Gitea) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Gitea) SetAuthUrl ¶
func (p Gitea) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Gitea) SetClientId ¶
func (p Gitea) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Gitea) SetClientSecret ¶
func (p Gitea) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Gitea) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Gitea) SetDisplayName ¶
func (p Gitea) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Gitea) SetPKCE ¶
func (p Gitea) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Gitea) SetRedirectUrl ¶
func (p Gitea) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Gitea) SetScopes ¶
func (p Gitea) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Gitea) SetTokenUrl ¶
func (p Gitea) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Gitea) SetUserApiUrl ¶
func (p Gitea) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Gitea) TokenUrl ¶
func (p Gitea) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Gitea) UserApiUrl ¶
func (p Gitea) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Gitee ¶
type Gitee struct {
// contains filtered or unexported fields
}
Gitee allows authentication via Gitee OAuth2.
func NewGiteeProvider ¶
func NewGiteeProvider() *Gitee
NewGiteeProvider creates new Gitee provider instance with some defaults.
func (Gitee) AuthUrl ¶
func (p Gitee) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Gitee) BuildAuthUrl ¶
func (p Gitee) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Gitee) ClientId ¶
func (p Gitee) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Gitee) ClientSecret ¶
func (p Gitee) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Gitee) DisplayName ¶
func (p Gitee) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Gitee) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based the Gitee's user api.
API reference: https://gitee.com/api/v5/swagger#/getV5User
func (Gitee) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Gitee) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Gitee) RedirectUrl ¶
func (p Gitee) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Gitee) Scopes ¶
func (p Gitee) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Gitee) SetAuthUrl ¶
func (p Gitee) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Gitee) SetClientId ¶
func (p Gitee) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Gitee) SetClientSecret ¶
func (p Gitee) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Gitee) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Gitee) SetDisplayName ¶
func (p Gitee) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Gitee) SetPKCE ¶
func (p Gitee) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Gitee) SetRedirectUrl ¶
func (p Gitee) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Gitee) SetScopes ¶
func (p Gitee) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Gitee) SetTokenUrl ¶
func (p Gitee) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Gitee) SetUserApiUrl ¶
func (p Gitee) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Gitee) TokenUrl ¶
func (p Gitee) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Gitee) UserApiUrl ¶
func (p Gitee) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Github ¶
type Github struct {
// contains filtered or unexported fields
}
Github allows authentication via Github OAuth2.
func NewGithubProvider ¶
func NewGithubProvider() *Github
NewGithubProvider creates new Github provider instance with some defaults.
func (Github) AuthUrl ¶
func (p Github) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Github) BuildAuthUrl ¶
func (p Github) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Github) ClientId ¶
func (p Github) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Github) ClientSecret ¶
func (p Github) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Github) DisplayName ¶
func (p Github) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Github) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based the Github's user api.
API reference: https://docs.github.com/en/rest/reference/users#get-the-authenticated-user
func (Github) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Github) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Github) RedirectUrl ¶
func (p Github) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Github) Scopes ¶
func (p Github) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Github) SetAuthUrl ¶
func (p Github) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Github) SetClientId ¶
func (p Github) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Github) SetClientSecret ¶
func (p Github) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Github) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Github) SetDisplayName ¶
func (p Github) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Github) SetPKCE ¶
func (p Github) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Github) SetRedirectUrl ¶
func (p Github) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Github) SetScopes ¶
func (p Github) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Github) SetTokenUrl ¶
func (p Github) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Github) SetUserApiUrl ¶
func (p Github) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Github) TokenUrl ¶
func (p Github) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Github) UserApiUrl ¶
func (p Github) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Gitlab ¶
type Gitlab struct {
// contains filtered or unexported fields
}
Gitlab allows authentication via Gitlab OAuth2.
func NewGitlabProvider ¶
func NewGitlabProvider() *Gitlab
NewGitlabProvider creates new Gitlab provider instance with some defaults.
func (Gitlab) AuthUrl ¶
func (p Gitlab) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Gitlab) BuildAuthUrl ¶
func (p Gitlab) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Gitlab) ClientId ¶
func (p Gitlab) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Gitlab) ClientSecret ¶
func (p Gitlab) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Gitlab) DisplayName ¶
func (p Gitlab) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Gitlab) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based the Gitlab's user api.
API reference: https://docs.gitlab.com/ee/api/users.html#for-admin
func (Gitlab) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Gitlab) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Gitlab) RedirectUrl ¶
func (p Gitlab) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Gitlab) Scopes ¶
func (p Gitlab) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Gitlab) SetAuthUrl ¶
func (p Gitlab) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Gitlab) SetClientId ¶
func (p Gitlab) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Gitlab) SetClientSecret ¶
func (p Gitlab) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Gitlab) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Gitlab) SetDisplayName ¶
func (p Gitlab) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Gitlab) SetPKCE ¶
func (p Gitlab) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Gitlab) SetRedirectUrl ¶
func (p Gitlab) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Gitlab) SetScopes ¶
func (p Gitlab) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Gitlab) SetTokenUrl ¶
func (p Gitlab) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Gitlab) SetUserApiUrl ¶
func (p Gitlab) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Gitlab) TokenUrl ¶
func (p Gitlab) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Gitlab) UserApiUrl ¶
func (p Gitlab) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Google ¶
type Google struct {
// contains filtered or unexported fields
}
Google allows authentication via Google OAuth2.
func NewGoogleProvider ¶
func NewGoogleProvider() *Google
NewGoogleProvider creates new Google provider instance with some defaults.
func (Google) AuthUrl ¶
func (p Google) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Google) BuildAuthUrl ¶
func (p Google) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Google) ClientId ¶
func (p Google) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Google) ClientSecret ¶
func (p Google) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Google) DisplayName ¶
func (p Google) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Google) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based the Google's user api.
func (Google) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Google) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Google) RedirectUrl ¶
func (p Google) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Google) Scopes ¶
func (p Google) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Google) SetAuthUrl ¶
func (p Google) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Google) SetClientId ¶
func (p Google) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Google) SetClientSecret ¶
func (p Google) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Google) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Google) SetDisplayName ¶
func (p Google) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Google) SetPKCE ¶
func (p Google) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Google) SetRedirectUrl ¶
func (p Google) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Google) SetScopes ¶
func (p Google) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Google) SetTokenUrl ¶
func (p Google) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Google) SetUserApiUrl ¶
func (p Google) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Google) TokenUrl ¶
func (p Google) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Google) UserApiUrl ¶
func (p Google) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Instagram ¶
type Instagram struct {
// contains filtered or unexported fields
}
Instagram allows authentication via Instagram OAuth2.
func NewInstagramProvider ¶
func NewInstagramProvider() *Instagram
NewInstagramProvider creates new Instagram provider instance with some defaults.
func (Instagram) AuthUrl ¶
func (p Instagram) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Instagram) BuildAuthUrl ¶
func (p Instagram) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Instagram) ClientId ¶
func (p Instagram) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Instagram) ClientSecret ¶
func (p Instagram) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Instagram) DisplayName ¶
func (p Instagram) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Instagram) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on the Instagram's user api.
API reference: https://developers.facebook.com/docs/instagram-basic-display-api/reference/user#fields
func (Instagram) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Instagram) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Instagram) PKCE ¶
func (p Instagram) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Instagram) RedirectUrl ¶
func (p Instagram) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Instagram) Scopes ¶
func (p Instagram) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Instagram) SetAuthUrl ¶
func (p Instagram) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Instagram) SetClientId ¶
func (p Instagram) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Instagram) SetClientSecret ¶
func (p Instagram) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Instagram) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Instagram) SetDisplayName ¶
func (p Instagram) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Instagram) SetPKCE ¶
func (p Instagram) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Instagram) SetRedirectUrl ¶
func (p Instagram) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Instagram) SetScopes ¶
func (p Instagram) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Instagram) SetTokenUrl ¶
func (p Instagram) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Instagram) SetUserApiUrl ¶
func (p Instagram) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Instagram) TokenUrl ¶
func (p Instagram) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Instagram) UserApiUrl ¶
func (p Instagram) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Kakao ¶
type Kakao struct {
// contains filtered or unexported fields
}
Kakao allows authentication via Kakao OAuth2.
func NewKakaoProvider ¶
func NewKakaoProvider() *Kakao
NewKakaoProvider creates a new Kakao provider instance with some defaults.
func (Kakao) AuthUrl ¶
func (p Kakao) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Kakao) BuildAuthUrl ¶
func (p Kakao) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Kakao) ClientId ¶
func (p Kakao) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Kakao) ClientSecret ¶
func (p Kakao) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Kakao) DisplayName ¶
func (p Kakao) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Kakao) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on the Kakao's user api.
API reference: https://developers.kakao.com/docs/latest/en/kakaologin/rest-api#req-user-info-response
func (Kakao) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Kakao) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Kakao) RedirectUrl ¶
func (p Kakao) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Kakao) Scopes ¶
func (p Kakao) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Kakao) SetAuthUrl ¶
func (p Kakao) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Kakao) SetClientId ¶
func (p Kakao) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Kakao) SetClientSecret ¶
func (p Kakao) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Kakao) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Kakao) SetDisplayName ¶
func (p Kakao) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Kakao) SetPKCE ¶
func (p Kakao) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Kakao) SetRedirectUrl ¶
func (p Kakao) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Kakao) SetScopes ¶
func (p Kakao) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Kakao) SetTokenUrl ¶
func (p Kakao) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Kakao) SetUserApiUrl ¶
func (p Kakao) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Kakao) TokenUrl ¶
func (p Kakao) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Kakao) UserApiUrl ¶
func (p Kakao) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Livechat ¶
type Livechat struct {
// contains filtered or unexported fields
}
Livechat allows authentication via Livechat OAuth2.
func NewLivechatProvider ¶
func NewLivechatProvider() *Livechat
NewLivechatProvider creates new Livechat provider instance with some defaults.
func (Livechat) AuthUrl ¶
func (p Livechat) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Livechat) BuildAuthUrl ¶
func (p Livechat) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Livechat) ClientId ¶
func (p Livechat) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Livechat) ClientSecret ¶
func (p Livechat) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Livechat) DisplayName ¶
func (p Livechat) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Livechat) FetchAuthUser ¶
FetchAuthUser returns an AuthUser based on the Livechat accounts API.
API reference: https://developers.livechat.com/docs/authorization
func (Livechat) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Livechat) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Livechat) PKCE ¶
func (p Livechat) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Livechat) RedirectUrl ¶
func (p Livechat) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Livechat) Scopes ¶
func (p Livechat) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Livechat) SetAuthUrl ¶
func (p Livechat) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Livechat) SetClientId ¶
func (p Livechat) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Livechat) SetClientSecret ¶
func (p Livechat) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Livechat) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Livechat) SetDisplayName ¶
func (p Livechat) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Livechat) SetPKCE ¶
func (p Livechat) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Livechat) SetRedirectUrl ¶
func (p Livechat) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Livechat) SetScopes ¶
func (p Livechat) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Livechat) SetTokenUrl ¶
func (p Livechat) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Livechat) SetUserApiUrl ¶
func (p Livechat) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Livechat) TokenUrl ¶
func (p Livechat) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Livechat) UserApiUrl ¶
func (p Livechat) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Mailcow ¶
type Mailcow struct {
// contains filtered or unexported fields
}
Mailcow allows authentication via mailcow OAuth2.
func NewMailcowProvider ¶
func NewMailcowProvider() *Mailcow
NewMailcowProvider creates a new mailcow provider instance with some defaults.
func (Mailcow) AuthUrl ¶
func (p Mailcow) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Mailcow) BuildAuthUrl ¶
func (p Mailcow) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Mailcow) ClientId ¶
func (p Mailcow) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Mailcow) ClientSecret ¶
func (p Mailcow) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Mailcow) DisplayName ¶
func (p Mailcow) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Mailcow) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on mailcow's user api.
API reference: https://github.com/mailcow/mailcow-dockerized/blob/master/data/web/oauth/profile.php
func (Mailcow) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Mailcow) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Mailcow) PKCE ¶
func (p Mailcow) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Mailcow) RedirectUrl ¶
func (p Mailcow) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Mailcow) Scopes ¶
func (p Mailcow) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Mailcow) SetAuthUrl ¶
func (p Mailcow) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Mailcow) SetClientId ¶
func (p Mailcow) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Mailcow) SetClientSecret ¶
func (p Mailcow) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Mailcow) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Mailcow) SetDisplayName ¶
func (p Mailcow) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Mailcow) SetPKCE ¶
func (p Mailcow) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Mailcow) SetRedirectUrl ¶
func (p Mailcow) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Mailcow) SetScopes ¶
func (p Mailcow) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Mailcow) SetTokenUrl ¶
func (p Mailcow) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Mailcow) SetUserApiUrl ¶
func (p Mailcow) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Mailcow) TokenUrl ¶
func (p Mailcow) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Mailcow) UserApiUrl ¶
func (p Mailcow) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Microsoft ¶
type Microsoft struct {
// contains filtered or unexported fields
}
Microsoft allows authentication via AzureADEndpoint OAuth2.
func NewMicrosoftProvider ¶
func NewMicrosoftProvider() *Microsoft
NewMicrosoftProvider creates new Microsoft AD provider instance with some defaults.
func (Microsoft) AuthUrl ¶
func (p Microsoft) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Microsoft) BuildAuthUrl ¶
func (p Microsoft) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Microsoft) ClientId ¶
func (p Microsoft) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Microsoft) ClientSecret ¶
func (p Microsoft) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Microsoft) DisplayName ¶
func (p Microsoft) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Microsoft) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on the Microsoft's user api.
API reference: https://learn.microsoft.com/en-us/azure/active-directory/develop/userinfo Graph explorer: https://developer.microsoft.com/en-us/graph/graph-explorer
func (Microsoft) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Microsoft) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Microsoft) PKCE ¶
func (p Microsoft) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Microsoft) RedirectUrl ¶
func (p Microsoft) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Microsoft) Scopes ¶
func (p Microsoft) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Microsoft) SetAuthUrl ¶
func (p Microsoft) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Microsoft) SetClientId ¶
func (p Microsoft) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Microsoft) SetClientSecret ¶
func (p Microsoft) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Microsoft) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Microsoft) SetDisplayName ¶
func (p Microsoft) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Microsoft) SetPKCE ¶
func (p Microsoft) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Microsoft) SetRedirectUrl ¶
func (p Microsoft) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Microsoft) SetScopes ¶
func (p Microsoft) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Microsoft) SetTokenUrl ¶
func (p Microsoft) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Microsoft) SetUserApiUrl ¶
func (p Microsoft) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Microsoft) TokenUrl ¶
func (p Microsoft) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Microsoft) UserApiUrl ¶
func (p Microsoft) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type OIDC ¶
type OIDC struct {
// contains filtered or unexported fields
}
OIDC allows authentication via OpenID Connect (OIDC) OAuth2 provider.
func NewOIDCProvider ¶
func NewOIDCProvider() *OIDC
NewOIDCProvider creates new OpenID Connect (OIDC) provider instance with some defaults.
func (OIDC) AuthUrl ¶
func (p OIDC) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (OIDC) BuildAuthUrl ¶
func (p OIDC) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (OIDC) ClientId ¶
func (p OIDC) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (OIDC) ClientSecret ¶
func (p OIDC) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (OIDC) DisplayName ¶
func (p OIDC) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*OIDC) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based the provider's user api.
API reference: https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims
func (OIDC) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (OIDC) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (OIDC) RedirectUrl ¶
func (p OIDC) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (OIDC) Scopes ¶
func (p OIDC) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (OIDC) SetAuthUrl ¶
func (p OIDC) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (OIDC) SetClientId ¶
func (p OIDC) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (OIDC) SetClientSecret ¶
func (p OIDC) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (OIDC) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (OIDC) SetDisplayName ¶
func (p OIDC) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (OIDC) SetPKCE ¶
func (p OIDC) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (OIDC) SetRedirectUrl ¶
func (p OIDC) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (OIDC) SetScopes ¶
func (p OIDC) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (OIDC) SetTokenUrl ¶
func (p OIDC) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (OIDC) SetUserApiUrl ¶
func (p OIDC) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (OIDC) TokenUrl ¶
func (p OIDC) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (OIDC) UserApiUrl ¶
func (p OIDC) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Patreon ¶
type Patreon struct {
// contains filtered or unexported fields
}
Patreon allows authentication via Patreon OAuth2.
func NewPatreonProvider ¶
func NewPatreonProvider() *Patreon
NewPatreonProvider creates new Patreon provider instance with some defaults.
func (Patreon) AuthUrl ¶
func (p Patreon) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Patreon) BuildAuthUrl ¶
func (p Patreon) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Patreon) ClientId ¶
func (p Patreon) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Patreon) ClientSecret ¶
func (p Patreon) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Patreon) DisplayName ¶
func (p Patreon) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Patreon) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on the Patreons's identity api.
API reference: https://docs.patreon.com/#get-api-oauth2-v2-identity https://docs.patreon.com/#user-v2
func (Patreon) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Patreon) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Patreon) PKCE ¶
func (p Patreon) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Patreon) RedirectUrl ¶
func (p Patreon) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Patreon) Scopes ¶
func (p Patreon) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Patreon) SetAuthUrl ¶
func (p Patreon) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Patreon) SetClientId ¶
func (p Patreon) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Patreon) SetClientSecret ¶
func (p Patreon) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Patreon) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Patreon) SetDisplayName ¶
func (p Patreon) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Patreon) SetPKCE ¶
func (p Patreon) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Patreon) SetRedirectUrl ¶
func (p Patreon) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Patreon) SetScopes ¶
func (p Patreon) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Patreon) SetTokenUrl ¶
func (p Patreon) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Patreon) SetUserApiUrl ¶
func (p Patreon) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Patreon) TokenUrl ¶
func (p Patreon) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Patreon) UserApiUrl ¶
func (p Patreon) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Planningcenter ¶
type Planningcenter struct {
// contains filtered or unexported fields
}
Planningcenter allows authentication via Planningcenter OAuth2.
func NewPlanningcenterProvider ¶
func NewPlanningcenterProvider() *Planningcenter
NewPlanningcenterProvider creates a new Planningcenter provider instance with some defaults.
func (Planningcenter) AuthUrl ¶
func (p Planningcenter) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Planningcenter) BuildAuthUrl ¶
func (p Planningcenter) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Planningcenter) ClientId ¶
func (p Planningcenter) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Planningcenter) ClientSecret ¶
func (p Planningcenter) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Planningcenter) DisplayName ¶
func (p Planningcenter) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Planningcenter) FetchAuthUser ¶
func (p *Planningcenter) FetchAuthUser(token *oauth2.Token) (*AuthUser, error)
FetchAuthUser returns an AuthUser instance based on the Planningcenter's user api.
API reference: https://developer.planning.center/docs/#/overview/authentication
func (Planningcenter) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Planningcenter) FetchToken ¶
func (p Planningcenter) FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
FetchToken implements Provider.FetchToken() interface method.
func (Planningcenter) PKCE ¶
func (p Planningcenter) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Planningcenter) RedirectUrl ¶
func (p Planningcenter) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Planningcenter) Scopes ¶
func (p Planningcenter) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Planningcenter) SetAuthUrl ¶
func (p Planningcenter) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Planningcenter) SetClientId ¶
func (p Planningcenter) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Planningcenter) SetClientSecret ¶
func (p Planningcenter) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Planningcenter) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Planningcenter) SetDisplayName ¶
func (p Planningcenter) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Planningcenter) SetPKCE ¶
func (p Planningcenter) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Planningcenter) SetRedirectUrl ¶
func (p Planningcenter) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Planningcenter) SetScopes ¶
func (p Planningcenter) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Planningcenter) SetTokenUrl ¶
func (p Planningcenter) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Planningcenter) SetUserApiUrl ¶
func (p Planningcenter) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Planningcenter) TokenUrl ¶
func (p Planningcenter) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Planningcenter) UserApiUrl ¶
func (p Planningcenter) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Provider ¶
type Provider interface { // Context returns the context associated with the provider (if any). Context() context.Context // SetContext assigns the specified context to the current provider. SetContext(ctx context.Context) // PKCE indicates whether the provider can use the PKCE flow. PKCE() bool // SetPKCE toggles the state whether the provider can use the PKCE flow or not. SetPKCE(enable bool) // DisplayName usually returns provider name as it is officially written // and it could be used directly in the UI. DisplayName() string // SetDisplayName sets the provider's display name. SetDisplayName(displayName string) // Scopes returns the provider access permissions that will be requested. Scopes() []string // SetScopes sets the provider access permissions that will be requested later. SetScopes(scopes []string) // ClientId returns the provider client's app ID. ClientId() string // SetClientId sets the provider client's ID. SetClientId(clientId string) // ClientSecret returns the provider client's app secret. ClientSecret() string // SetClientSecret sets the provider client's app secret. SetClientSecret(secret string) // RedirectUrl returns the end address to redirect the user // going through the OAuth flow. RedirectUrl() string // SetRedirectUrl sets the provider's RedirectUrl. SetRedirectUrl(url string) // AuthUrl returns the provider's authorization service url. AuthUrl() string // SetAuthUrl sets the provider's AuthUrl. SetAuthUrl(url string) // TokenUrl returns the provider's token exchange service url. TokenUrl() string // SetTokenUrl sets the provider's TokenUrl. SetTokenUrl(url string) // UserApiUrl returns the provider's user info api url. UserApiUrl() string // SetUserApiUrl sets the provider's UserApiUrl. SetUserApiUrl(url string) // Client returns an http client using the provided token. Client(token *oauth2.Token) *http.Client // BuildAuthUrl returns a URL to the provider's consent page // that asks for permissions for the required scopes explicitly. BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string // FetchToken converts an authorization code to token. FetchToken(code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error) // FetchRawUserData requests and marshalizes into `result` the // the OAuth user api response. FetchRawUserData(token *oauth2.Token) ([]byte, error) // FetchAuthUser is similar to FetchRawUserData, but normalizes and // marshalizes the user api response into a standardized AuthUser struct. FetchAuthUser(token *oauth2.Token) (user *AuthUser, err error) }
Provider defines a common interface for an OAuth2 client.
func NewProviderByName ¶
NewProviderByName returns a new preconfigured provider instance by its name identifier.
type Spotify ¶
type Spotify struct {
// contains filtered or unexported fields
}
Spotify allows authentication via Spotify OAuth2.
func NewSpotifyProvider ¶
func NewSpotifyProvider() *Spotify
NewSpotifyProvider creates a new Spotify provider instance with some defaults.
func (Spotify) AuthUrl ¶
func (p Spotify) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Spotify) BuildAuthUrl ¶
func (p Spotify) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Spotify) ClientId ¶
func (p Spotify) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Spotify) ClientSecret ¶
func (p Spotify) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Spotify) DisplayName ¶
func (p Spotify) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Spotify) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on the Spotify's user api.
API reference: https://developer.spotify.com/documentation/web-api/reference/#/operations/get-current-users-profile
func (Spotify) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Spotify) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Spotify) PKCE ¶
func (p Spotify) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Spotify) RedirectUrl ¶
func (p Spotify) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Spotify) Scopes ¶
func (p Spotify) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Spotify) SetAuthUrl ¶
func (p Spotify) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Spotify) SetClientId ¶
func (p Spotify) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Spotify) SetClientSecret ¶
func (p Spotify) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Spotify) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Spotify) SetDisplayName ¶
func (p Spotify) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Spotify) SetPKCE ¶
func (p Spotify) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Spotify) SetRedirectUrl ¶
func (p Spotify) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Spotify) SetScopes ¶
func (p Spotify) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Spotify) SetTokenUrl ¶
func (p Spotify) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Spotify) SetUserApiUrl ¶
func (p Spotify) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Spotify) TokenUrl ¶
func (p Spotify) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Spotify) UserApiUrl ¶
func (p Spotify) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Strava ¶
type Strava struct {
// contains filtered or unexported fields
}
Strava allows authentication via Strava OAuth2.
func NewStravaProvider ¶
func NewStravaProvider() *Strava
NewStravaProvider creates new Strava provider instance with some defaults.
func (Strava) AuthUrl ¶
func (p Strava) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Strava) BuildAuthUrl ¶
func (p Strava) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Strava) ClientId ¶
func (p Strava) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Strava) ClientSecret ¶
func (p Strava) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Strava) DisplayName ¶
func (p Strava) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Strava) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on the Strava's user api.
API reference: https://developers.strava.com/docs/authentication/
func (Strava) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Strava) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Strava) RedirectUrl ¶
func (p Strava) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Strava) Scopes ¶
func (p Strava) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Strava) SetAuthUrl ¶
func (p Strava) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Strava) SetClientId ¶
func (p Strava) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Strava) SetClientSecret ¶
func (p Strava) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Strava) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Strava) SetDisplayName ¶
func (p Strava) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Strava) SetPKCE ¶
func (p Strava) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Strava) SetRedirectUrl ¶
func (p Strava) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Strava) SetScopes ¶
func (p Strava) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Strava) SetTokenUrl ¶
func (p Strava) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Strava) SetUserApiUrl ¶
func (p Strava) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Strava) TokenUrl ¶
func (p Strava) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Strava) UserApiUrl ¶
func (p Strava) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Twitch ¶
type Twitch struct {
// contains filtered or unexported fields
}
Twitch allows authentication via Twitch OAuth2.
func NewTwitchProvider ¶
func NewTwitchProvider() *Twitch
NewTwitchProvider creates new Twitch provider instance with some defaults.
func (Twitch) AuthUrl ¶
func (p Twitch) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Twitch) BuildAuthUrl ¶
func (p Twitch) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Twitch) ClientId ¶
func (p Twitch) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Twitch) ClientSecret ¶
func (p Twitch) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Twitch) DisplayName ¶
func (p Twitch) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Twitch) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based the Twitch's user api.
API reference: https://dev.twitch.tv/docs/api/reference#get-users
func (*Twitch) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData interface.
This differ from baseProvider because Twitch requires the `Client-Id` header.
func (Twitch) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Twitch) RedirectUrl ¶
func (p Twitch) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Twitch) Scopes ¶
func (p Twitch) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Twitch) SetAuthUrl ¶
func (p Twitch) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Twitch) SetClientId ¶
func (p Twitch) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Twitch) SetClientSecret ¶
func (p Twitch) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Twitch) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Twitch) SetDisplayName ¶
func (p Twitch) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Twitch) SetPKCE ¶
func (p Twitch) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Twitch) SetRedirectUrl ¶
func (p Twitch) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Twitch) SetScopes ¶
func (p Twitch) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Twitch) SetTokenUrl ¶
func (p Twitch) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Twitch) SetUserApiUrl ¶
func (p Twitch) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Twitch) TokenUrl ¶
func (p Twitch) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Twitch) UserApiUrl ¶
func (p Twitch) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Twitter ¶
type Twitter struct {
// contains filtered or unexported fields
}
Twitter allows authentication via Twitter OAuth2.
func NewTwitterProvider ¶
func NewTwitterProvider() *Twitter
NewTwitterProvider creates new Twitter provider instance with some defaults.
func (Twitter) AuthUrl ¶
func (p Twitter) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Twitter) BuildAuthUrl ¶
func (p Twitter) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Twitter) ClientId ¶
func (p Twitter) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Twitter) ClientSecret ¶
func (p Twitter) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Twitter) DisplayName ¶
func (p Twitter) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Twitter) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on the Twitter's user api.
API reference: https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me
func (Twitter) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Twitter) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Twitter) PKCE ¶
func (p Twitter) PKCE() bool
PKCE implements Provider.PKCE() interface method.
func (Twitter) RedirectUrl ¶
func (p Twitter) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Twitter) Scopes ¶
func (p Twitter) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Twitter) SetAuthUrl ¶
func (p Twitter) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Twitter) SetClientId ¶
func (p Twitter) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Twitter) SetClientSecret ¶
func (p Twitter) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Twitter) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Twitter) SetDisplayName ¶
func (p Twitter) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Twitter) SetPKCE ¶
func (p Twitter) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Twitter) SetRedirectUrl ¶
func (p Twitter) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Twitter) SetScopes ¶
func (p Twitter) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Twitter) SetTokenUrl ¶
func (p Twitter) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Twitter) SetUserApiUrl ¶
func (p Twitter) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Twitter) TokenUrl ¶
func (p Twitter) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Twitter) UserApiUrl ¶
func (p Twitter) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type VK ¶
type VK struct {
// contains filtered or unexported fields
}
VK allows authentication via VK OAuth2.
func NewVKProvider ¶
func NewVKProvider() *VK
NewVKProvider creates new VK provider instance with some defaults.
func (VK) AuthUrl ¶
func (p VK) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (VK) BuildAuthUrl ¶
func (p VK) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (VK) ClientId ¶
func (p VK) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (VK) ClientSecret ¶
func (p VK) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (VK) DisplayName ¶
func (p VK) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*VK) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on VK's user api.
API reference: https://dev.vk.com/method/users.get
func (VK) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (VK) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (VK) RedirectUrl ¶
func (p VK) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (VK) Scopes ¶
func (p VK) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (VK) SetAuthUrl ¶
func (p VK) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (VK) SetClientId ¶
func (p VK) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (VK) SetClientSecret ¶
func (p VK) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (VK) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (VK) SetDisplayName ¶
func (p VK) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (VK) SetPKCE ¶
func (p VK) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (VK) SetRedirectUrl ¶
func (p VK) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (VK) SetScopes ¶
func (p VK) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (VK) SetTokenUrl ¶
func (p VK) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (VK) SetUserApiUrl ¶
func (p VK) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (VK) TokenUrl ¶
func (p VK) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (VK) UserApiUrl ¶
func (p VK) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.
type Yandex ¶
type Yandex struct {
// contains filtered or unexported fields
}
Yandex allows authentication via Yandex OAuth2.
func NewYandexProvider ¶
func NewYandexProvider() *Yandex
NewYandexProvider creates new Yandex provider instance with some defaults.
func (Yandex) AuthUrl ¶
func (p Yandex) AuthUrl() string
AuthUrl implements Provider.AuthUrl() interface method.
func (Yandex) BuildAuthUrl ¶
func (p Yandex) BuildAuthUrl(state string, opts ...oauth2.AuthCodeOption) string
BuildAuthUrl implements Provider.BuildAuthUrl() interface method.
func (Yandex) ClientId ¶
func (p Yandex) ClientId() string
ClientId implements Provider.ClientId() interface method.
func (Yandex) ClientSecret ¶
func (p Yandex) ClientSecret() string
ClientSecret implements Provider.ClientSecret() interface method.
func (Yandex) DisplayName ¶
func (p Yandex) DisplayName() string
DisplayName implements Provider.DisplayName() interface method.
func (*Yandex) FetchAuthUser ¶
FetchAuthUser returns an AuthUser instance based on Yandex's user api.
API reference: https://yandex.ru/dev/id/doc/en/user-information#response-format
func (Yandex) FetchRawUserData ¶
FetchRawUserData implements Provider.FetchRawUserData() interface method.
func (Yandex) FetchToken ¶
FetchToken implements Provider.FetchToken() interface method.
func (Yandex) RedirectUrl ¶
func (p Yandex) RedirectUrl() string
RedirectUrl implements Provider.RedirectUrl() interface method.
func (Yandex) Scopes ¶
func (p Yandex) Scopes() []string
Scopes implements Provider.Scopes() interface method.
func (Yandex) SetAuthUrl ¶
func (p Yandex) SetAuthUrl(url string)
SetAuthUrl implements Provider.SetAuthUrl() interface method.
func (Yandex) SetClientId ¶
func (p Yandex) SetClientId(clientId string)
SetClientId implements Provider.SetClientId() interface method.
func (Yandex) SetClientSecret ¶
func (p Yandex) SetClientSecret(secret string)
SetClientSecret implements Provider.SetClientSecret() interface method.
func (Yandex) SetContext ¶
SetContext implements Provider.SetContext() interface method.
func (Yandex) SetDisplayName ¶
func (p Yandex) SetDisplayName(displayName string)
SetDisplayName implements Provider.SetDisplayName() interface method.
func (Yandex) SetPKCE ¶
func (p Yandex) SetPKCE(enable bool)
SetPKCE implements Provider.SetPKCE() interface method.
func (Yandex) SetRedirectUrl ¶
func (p Yandex) SetRedirectUrl(url string)
SetRedirectUrl implements Provider.SetRedirectUrl() interface method.
func (Yandex) SetScopes ¶
func (p Yandex) SetScopes(scopes []string)
SetScopes implements Provider.SetScopes() interface method.
func (Yandex) SetTokenUrl ¶
func (p Yandex) SetTokenUrl(url string)
SetTokenUrl implements Provider.SetTokenUrl() interface method.
func (Yandex) SetUserApiUrl ¶
func (p Yandex) SetUserApiUrl(url string)
SetUserApiUrl implements Provider.SetUserApiUrl() interface method.
func (Yandex) TokenUrl ¶
func (p Yandex) TokenUrl() string
TokenUrl implements Provider.TokenUrl() interface method.
func (Yandex) UserApiUrl ¶
func (p Yandex) UserApiUrl() string
UserApiUrl implements Provider.UserApiUrl() interface method.