github

package
v0.0.0-...-6a6ccda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2017 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AuthorizeURL = "https://github.com/login/oauth/authorize"
	TokenURL     = "https://github.com/login/oauth/access_token"
)

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientID         string
	ClientSecret     string
	AuthorizeURL     string
	TokenURL         string
	RedirectURL      string
	Scopes           []string
	AuthorizeHandler func(*auth.Context) (*claims.Claims, error)
}

Config github Config

type GithubProvider

type GithubProvider struct {
	*Config
}

GithubProvider provide login with github method

func New

func New(config *Config) *GithubProvider

func (GithubProvider) Callback

func (provider GithubProvider) Callback(context *auth.Context)

Callback implement Callback with github provider

func (GithubProvider) ConfigAuth

func (provider GithubProvider) ConfigAuth(*auth.Auth)

ConfigAuth config auth

func (GithubProvider) GetName

func (GithubProvider) GetName() string

GetName return provider name

func (GithubProvider) Login

func (provider GithubProvider) Login(context *auth.Context)

Login implemented login with github provider

func (GithubProvider) Logout

func (GithubProvider) Logout(context *auth.Context)

Logout implemented logout with github provider

func (GithubProvider) OAuthConfig

func (provider GithubProvider) OAuthConfig(context *auth.Context) *oauth2.Config

OAuthConfig return oauth config based on configuration

func (GithubProvider) Register

func (provider GithubProvider) Register(context *auth.Context)

Register implemented register with github provider

func (GithubProvider) ServeHTTP

func (GithubProvider) ServeHTTP(*auth.Context)

ServeHTTP implement ServeHTTP with github provider

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL