Documentation ¶
Index ¶
- Variables
- func Default() *oauth2.OAuth
- func DefaultOAuth() *oauth2.OAuth
- func FireAfterLoginSuccess(ctx echo.Context, ouser *goth.User) (end bool, err error)
- func GetOAuthAccounts() []oauth2.Account
- func InitOauth(e *echo.Echo)
- func OnAfterLoginSuccess(hooks ...func(ctx echo.Context, ouser *goth.User) (end bool, err error))
- func OnChangeBackendURL(d config.Diff) error
- func OnInstalled(ctx echo.Context) error
- func RegisterProvider(c *oauth2.Config)
- func UpdateOAuthAccount() error
- type OAuth2Config
- type OAuthAccount
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SuccessHandler interface{} = successHandler BeginAuthHandler echo.Handler = echo.HandlerFunc(oauth2.BeginAuthHandler) AfterLoginSuccess []func(ctx echo.Context, ouser *goth.User) (end bool, err error) )
Functions ¶
func DefaultOAuth ¶
func FireAfterLoginSuccess ¶
func GetOAuthAccounts ¶
func OnAfterLoginSuccess ¶
func OnChangeBackendURL ¶
func OnInstalled ¶
Types ¶
type OAuth2Config ¶
type OAuth2Config struct { On bool `json:"on" xml:"on"` // on / off Accounts []OAuthAccount `json:"accounts" xml:"accounts"` }
func (*OAuth2Config) Reload ¶
func (c *OAuth2Config) Reload() error
func (*OAuth2Config) ToAccounts ¶
func (c *OAuth2Config) ToAccounts() []*oauth2.Account
type OAuthAccount ¶
type OAuthAccount struct { On bool `json:"on" xml:"on"` // on / off Name string `json:"name" xml:"name"` AppID string `json:"appID" xml:"appID"` Secret string `json:"secret" xml:"secret"` Extra echo.H `json:"extra" xml:"extra"` }
func (*OAuthAccount) ToAccount ¶
func (c *OAuthAccount) ToAccount() *oauth2.Account
Click to show internal directories.
Click to hide internal directories.