Documentation ¶
Index ¶
- Constants
- func NewGithub(cfg map[string]string) server.AuthProvider
- func NewGoogle(cfg map[string]string) server.AuthProvider
- func NewLocal(cfg map[string]string) server.AuthProvider
- func NewTwitter(cfg map[string]string) server.AuthProvider
- type AuthAuthProvider
- type GithubAccessTokenResponse
- type GithubAuthProvider
- func (g *GithubAuthProvider) Callback(c server.Context) (u *entities.User, err error)
- func (g *GithubAuthProvider) GetGithubAccessToken(code string) (string, error)
- func (g *GithubAuthProvider) GetGithubUser(accessToken string) (*GithubUserResponse, error)
- func (g *GithubAuthProvider) GetGithubUserFromAccessCode(code string) (*GithubUserResponse, error)
- func (g *GithubAuthProvider) Login(c server.Context) error
- func (g *GithubAuthProvider) Name() string
- type GithubUserResponse
- type GoogleAuthProvider
- type GoogleUserResponse
- type LoginData
- type TwitterAuthProvider
- type TwitterUserResponse
Constants ¶
View Source
const GITHUB_ACCESS_TOKEN_URL = "https://github.com/login/oauth/access_token"
View Source
const GITHUB_USER_URL = "https://api.github.com/user"
Variables ¶
This section is empty.
Functions ¶
func NewTwitter ¶
func NewTwitter(cfg map[string]string) server.AuthProvider
Types ¶
type AuthAuthProvider ¶
type AuthAuthProvider struct { }
func (*AuthAuthProvider) Name ¶
func (g *AuthAuthProvider) Name() string
type GithubAuthProvider ¶
type GithubAuthProvider struct {
// contains filtered or unexported fields
}
func (*GithubAuthProvider) GetGithubAccessToken ¶
func (g *GithubAuthProvider) GetGithubAccessToken(code string) (string, error)
func (*GithubAuthProvider) GetGithubUser ¶
func (g *GithubAuthProvider) GetGithubUser(accessToken string) (*GithubUserResponse, error)
func (*GithubAuthProvider) GetGithubUserFromAccessCode ¶
func (g *GithubAuthProvider) GetGithubUserFromAccessCode(code string) (*GithubUserResponse, error)
func (*GithubAuthProvider) Name ¶
func (g *GithubAuthProvider) Name() string
type GithubUserResponse ¶
type GoogleAuthProvider ¶
type GoogleAuthProvider struct {
// contains filtered or unexported fields
}
func (*GoogleAuthProvider) GetGoogleUserFromAccessCode ¶
func (g *GoogleAuthProvider) GetGoogleUserFromAccessCode(code string) (*GoogleUserResponse, error)
func (*GoogleAuthProvider) Name ¶
func (g *GoogleAuthProvider) Name() string
type GoogleUserResponse ¶
type TwitterAuthProvider ¶
type TwitterAuthProvider struct {
// contains filtered or unexported fields
}
func (*TwitterAuthProvider) Name ¶
func (g *TwitterAuthProvider) Name() string
Click to show internal directories.
Click to hide internal directories.