Documentation
¶
Index ¶
- Constants
- Variables
- func ClearProviders()
- func Init(ctx context.Context) error
- func IsErrOpenIDConnectInitialize(err error) bool
- func RegisterGothProvider(provider GothProvider)
- func RegisterProviderWithGothic(providerName string, source *Source) error
- func RemoveProviderFromGothic(providerName string)
- func ResetOAuth2(ctx context.Context) error
- type Attribute
- type AuthSourceProvider
- type BaseProvider
- type CustomProvider
- type CustomProviderNewFn
- type CustomURLMapping
- type CustomURLSettings
- type ErrOpenIDConnectInitialize
- type GothProvider
- type GothProviderCreator
- type OpenIDProvider
- func (o *OpenIDProvider) CreateGothProvider(providerName, callbackURL string, source *Source) (goth.Provider, error)
- func (o *OpenIDProvider) CustomURLSettings() *CustomURLSettings
- func (o *OpenIDProvider) DisplayName() string
- func (o *OpenIDProvider) IconHTML(size int) template.HTML
- func (o *OpenIDProvider) Name() string
- func (o *OpenIDProvider) SupportSSHPublicKey() bool
- type Provider
- type SessionsStore
- type SimpleProvider
- type SimpleProviderNewFn
- type Source
- func (source *Source) Authenticate(ctx context.Context, user *user_model.User, login, password string) (*user_model.User, error)
- func (source *Source) Callback(request *http.Request, response http.ResponseWriter) (goth.User, error)
- func (source *Source) Callout(request *http.Request, response http.ResponseWriter) error
- func (source *Source) DisplayName() string
- func (source *Source) FromDB(bs []byte) error
- func (source *Source) Name() string
- func (source *Source) RegisterSource() error
- func (source *Source) Sync(ctx context.Context, updateExisting bool) error
- func (source *Source) ToDB() ([]byte, error)
- func (source *Source) UnregisterSource() error
Constants ¶
View Source
const ProviderHeaderKey = "gitea-oauth2-provider"
ProviderHeaderKey is the HTTP header key
Variables ¶
Functions ¶
func ClearProviders ¶
func ClearProviders()
ClearProviders clears all OAuth2 providers from the goth lib
func IsErrOpenIDConnectInitialize ¶
IsErrOpenIDConnectInitialize checks if an error is a ExternalLoginUserAlreadyExist.
func RegisterGothProvider ¶
func RegisterGothProvider(provider GothProvider)
RegisterGothProvider registers a GothProvider
func RegisterProviderWithGothic ¶
RegisterProviderWithGothic register a OAuth2 provider in goth lib
func RemoveProviderFromGothic ¶
func RemoveProviderFromGothic(providerName