Documentation
¶
Index ¶
- Variables
- func GetExternalUserAuthType() core.UserExternalAuthType
- func GetOAuth2AuthUrl(c core.Context, state string, verifier string) (string, error)
- func GetOAuth2Token(c core.Context, code string, verifier string) (*oauth2.Token, error)
- func GetOAuth2UserInfo(c core.Context, token *oauth2.Token) (*data.OAuth2UserInfo, error)
- func InitializeOAuth2Provider(config *settings.Config) error
- type OAuth2Container
- type OAuth2Context
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Container = &OAuth2Container{}
)
Initialize a OAuth 2.0 container singleton instance
Functions ¶
func GetExternalUserAuthType ¶
func GetExternalUserAuthType() core.UserExternalAuthType
GetExternalUserAuthType returns the external user auth type of the current OAuth 2.0 provider
func GetOAuth2AuthUrl ¶
GetOAuth2AuthUrl returns the OAuth 2.0 authentication url
func GetOAuth2Token ¶
GetOAuth2Token exchanges the authorization code for an OAuth 2.0 token
func GetOAuth2UserInfo ¶
GetOAuth2UserInfo retrieves the OAuth 2.0 user info using the provided OAuth 2.0 token
func InitializeOAuth2Provider ¶
InitializeOAuth2Provider initializes the current OAuth 2.0 provider according to the config
Types ¶
type OAuth2Container ¶
type OAuth2Container struct {
// contains filtered or unexported fields
}
OAuth2Container contains the current OAuth 2.0 authentication provider
type OAuth2Context ¶
OAuth2Context represents the context for OAuth 2.0 operations
func (*OAuth2Context) Value ¶
func (c *OAuth2Context) Value(key any) any
Value returns the value associated with key
Click to show internal directories.
Click to hide internal directories.