Documentation
¶
Index ¶
- Constants
- type CallBackOAuth
- type ConfigOAuth
- type ConfigOAuthItem
- type IspGoogle
- type IspYandex
- type OAuth
- func (v *OAuth) AddProviders(p ...OAuthProvider)
- func (v *OAuth) CallBack(name string, call CallBackOAuth) func(w http.ResponseWriter, r *http.Request)
- func (v *OAuth) Down() error
- func (v *OAuth) GetProvider(name string) (OAuthProvider, error)
- func (v *OAuth) Request(name string) func(http.ResponseWriter, *http.Request)
- func (v *OAuth) Up() error
- type OAuthProvider
- type UserGoogle
- type UserOAuth
- type UserYandex
Constants ¶
View Source
const CodeGoogle = "google"
View Source
const CodeYandex = "yandex"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallBackOAuth ¶
type CallBackOAuth func(http.ResponseWriter, *http.Request, UserOAuth)
type ConfigOAuth ¶
type ConfigOAuth struct {
Provider []ConfigOAuthItem `yaml:"oauth"`
}
type ConfigOAuthItem ¶
type IspGoogle ¶
type IspGoogle struct {
// contains filtered or unexported fields
}
func (*IspGoogle) AuthCodeKey ¶
func (*IspGoogle) AuthCodeURL ¶
func (*IspGoogle) Config ¶
func (v *IspGoogle) Config(c ConfigOAuthItem)
type IspYandex ¶
type IspYandex struct {
// contains filtered or unexported fields
}
func (*IspYandex) AuthCodeKey ¶
func (*IspYandex) AuthCodeURL ¶
func (*IspYandex) Config ¶
func (v *IspYandex) Config(c ConfigOAuthItem)
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
func NewOAuth ¶
func NewOAuth(c *ConfigOAuth) *OAuth
func (*OAuth) AddProviders ¶
func (v *OAuth) AddProviders(p ...OAuthProvider)
func (*OAuth) CallBack ¶
func (v *OAuth) CallBack(name string, call CallBackOAuth) func(w http.ResponseWriter, r *http.Request)
func (*OAuth) GetProvider ¶
func (v *OAuth) GetProvider(name string) (OAuthProvider, error)
type OAuthProvider ¶
type UserGoogle ¶
type UserGoogle struct {
// contains filtered or unexported fields
}
func (*UserGoogle) GetEmail ¶
func (v *UserGoogle) GetEmail() string
func (*UserGoogle) GetIcon ¶
func (v *UserGoogle) GetIcon() string
func (*UserGoogle) GetName ¶
func (v *UserGoogle) GetName() string
func (*UserGoogle) UnmarshalJSON ¶
func (v *UserGoogle) UnmarshalJSON(data []byte) error
type UserYandex ¶
type UserYandex struct {
// contains filtered or unexported fields
}
func (*UserYandex) GetEmail ¶
func (v *UserYandex) GetEmail() string
func (*UserYandex) GetIcon ¶
func (v *UserYandex) GetIcon() string
func (*UserYandex) GetName ¶
func (v *UserYandex) GetName() string
func (*UserYandex) UnmarshalJSON ¶
func (v *UserYandex) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.