import "code.gitea.io/gitea/modules/auth/oauth2"
Auth OAuth2 auth service
func ClearProviders()
ClearProviders clears all OAuth2 providers from the goth lib
GetDefaultAuthURL return the default authorize url for the given provider
GetDefaultEmailURL return the default email url for the given provider
GetDefaultProfileURL return the default profile url for the given provider
GetDefaultTokenURL return the default token url for the given provider
Init initialize the setup of the OAuth2 library
func ProviderCallback(provider string, request *http.Request, response http.ResponseWriter) (goth.User, error)
ProviderCallback handles OAuth callback, resolve to a goth user and send back to original url this will trigger a new authentication request, but because we save it in the session we can use that
func RegisterProvider(providerName, providerType, clientID, clientSecret, openIDConnectAutoDiscoveryURL string, customURLMapping *CustomURLMapping) error
RegisterProvider register a OAuth2 provider in goth lib
RemoveProvider removes the given OAuth2 provider from the goth lib
CustomURLMapping describes the urls values to use when customizing OAuth2 provider URLs
Package oauth2 imports 22 packages (graph) and is imported by 63 packages. Updated 2021-01-16. Refresh now. Tools for package owners.