oauth2

package
v0.0.0-...-dffa276 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 6 Imported by: 3

Documentation

Overview

Package oauth2 contains Martini handlers to provide user login via an OAuth 2.0 backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProvider

func GetProvider(provider string) (id string, secret string, redirectURL string)

func OauthRequest

func OauthRequest(url *url.URL, conf *oauth2.Config, authResponse AuthResponse) (*http.Response, *oauth2.Token, error)

func OauthURL

func OauthURL(conf *oauth2.Config) string

Your credentials should be obtained from the Google Developer Console (https://console.developers.google.com).

Types

type AuthResponse

type AuthResponse struct {
	State       string `form:"state"`
	Code        string `form:"code"`
	Authuser    int    `form:"authuser"`
	NumSessions int    `form:"num_sessions"`

	ImageName    string `form:"imageName"`
	SessionState string `form:"session_state"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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