oauth

package
v0.0.0-...-e1bbea1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package google provides you access to Google's OAuth2 infrastructure. The implementation is based on this blog post: http://skarlso.github.io/2016/06/12/google-signin-with-go/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth() gin.HandlerFunc

func AutoRegister

func AutoRegister(c *gin.Context)

func GetLoginURL

func GetLoginURL(state string) string

func LoginHandler

func LoginHandler(ctx *gin.Context)

func Setup

func Setup(redirectURL string, scopes []string)

Setup the authorization path

Types

type Credentials

type Credentials struct {
	ClientID     string `json:"clientid"`
	ClientSecret string `json:"secret"`
}

Credentials stores google client-ids.

Jump to

Keyboard shortcuts

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