auth

package
v0.0.0-...-881522d Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuthenticationMiddleware

func CheckAuthenticationMiddleware(c *gin.Context)

func HandleAuthGoogleCallback

func HandleAuthGoogleCallback(c *gin.Context)

HandleAuthGoogleCallback handles the callback from Google and if successful, redirects the user to 'redirect_url' An 'access_token' will be added to the query of the 'redirect_url'.

func HandleAuthGoogleInitiation

func HandleAuthGoogleInitiation(c *gin.Context)

HandleAuthGoogleInitiation handles the initiation of Google authentication. "redirect_url" must be passed via query to redirect users after authentication is complete.

Types

type GoogleUserInfo

type GoogleUserInfo 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"`
	Picture       string `json:"picture"`
	Locale        string `json:"locale"`
}

Jump to

Keyboard shortcuts

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