internal

package
v0.0.0-...-4f13886 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	CustomParams map[string]string
	FetchUser    func(t *oauth2.Token) (*ProviderUI, error)
	Config       oauth2.Config
}

Provider describes the provider's auth flow

func (*Provider) AuthURL

func (p *Provider) AuthURL(redirectURI string) (string, error)

AuthURL returns a URL to provider's consent page that asks for permissions for the required scopes explicitly

func (*Provider) Exchange

func (p *Provider) Exchange(redirectURI, authCode string) (*oauth2.Token, error)

Exchange converts an authorization code into a token

func (*Provider) RedirectURI

func (p *Provider) RedirectURI(ctx *gin.Context, pap string) (string, error)

RedirectURI returns the URL to redirect users going through the auth flow, after the resource owner's URLs

type ProviderUI

type ProviderUI struct {
	ProviderID  string
	Name        string
	DisplayName string
	Avatar      string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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