Documentation ¶
Index ¶
- Constants
- type CallBack
- type Config
- type ConfigItem
- type IspGoogle
- type IspYandex
- type OAuth
- func (v *OAuth) AddProviders(p ...Provider)
- func (v *OAuth) CallBack(name string, call CallBack) func(w http.ResponseWriter, r *http.Request)
- func (v *OAuth) Down() error
- func (v *OAuth) GetProvider(name string) (Provider, error)
- func (v *OAuth) Request(name string) func(http.ResponseWriter, *http.Request)
- func (v *OAuth) Up() error
- type Provider
- type User
- type UserGoogle
- 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 Config ¶
type Config struct {
Provider []ConfigItem `yaml:"oauth"`
}
type ConfigItem ¶
type IspGoogle ¶
type IspGoogle struct {
// contains filtered or unexported fields
}
func (*IspGoogle) AuthCodeKey ¶
func (*IspGoogle) AuthCodeURL ¶
func (*IspGoogle) Config ¶
func (v *IspGoogle) Config(c ConfigItem)
type IspYandex ¶
type IspYandex struct {
// contains filtered or unexported fields
}
func (*IspYandex) AuthCodeKey ¶
func (*IspYandex) AuthCodeURL ¶
func (*IspYandex) Config ¶
func (v *IspYandex) Config(c ConfigItem)
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
func (*OAuth) AddProviders ¶
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.