oauth2

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2017 License: MIT Imports: 10 Imported by: 0 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

This section is empty.

Functions

func Auth

func Auth(provider string, request *http.Request, response http.ResponseWriter) error

Auth OAuth2 auth service

func Init

func Init()

Init initialize the setup of the OAuth2 library

func ProviderCallback

func ProviderCallback(provider string, request *http.Request, response http.ResponseWriter) (goth.User, error)

ProviderCallback handles OAuth callback, resolve to a goth user and send back to original url this will trigger a new authentication request, but because we save it in the session we can use that

func RegisterProvider

func RegisterProvider(providerName, providerType, clientID, clientSecret string)

RegisterProvider register a OAuth2 provider in goth lib

func RemoveProvider

func RemoveProvider(providerName string)

RemoveProvider removes the given OAuth2 provider from the goth lib

Types

This section is empty.

Jump to

Keyboard shortcuts

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