oauth2

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Copyright 2019 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetgoogleOAuth2Config

func GetgoogleOAuth2Config() oauth2.Config

func GoogleCallbackRouter

func GoogleCallbackRouter(context *gin.Context)

谷歌登陆成功之后的回调函数

func GoogleLoginRouter

func GoogleLoginRouter(context *gin.Context)

调用谷歌登陆,然后重定向到谷歌认证页面

Types

type GoogleAuthResponse

type GoogleAuthResponse struct {
	Id            string `json:"id"`
	Email         string `json:"email"`
	VerifiedEmail bool   `json:"verified_email"`
	Name          string `json:"name"`
	GivenName     string `json:"given_name"`
	FamilyName    string `json:"family_name"`
	Link          string `json:"link"`
	Picture       string `json:"picture"`
	Gender        string `json:"gender"`
	Locale        string `json:"locale"`
}

type Query

type Query struct {
	State string `form:"state" json:"state"`
	Code  string `form:"code" json:"code"`
}

Jump to

Keyboard shortcuts

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