auth

package
v0.0.0-...-cbe3bb0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ISS_1 = "accounts.google.com"
View Source
var ISS_2 = "https://accounts.google.com"
View Source
var PUBLIC_KEY_URL = "https://www.googleapis.com/oauth2/v1/certs"

Functions

func CreateToken

func CreateToken(userID string, tokenTypes string) (string, error)

Types

type GoogleClaims

type GoogleClaims struct {
	UserID    string `json:"sub"`
	Email     string `json:"email"`
	FirstName string `json:"given_name"`
	LastName  string `json:"family_name"`
	Picture   string `json:"picture"`
	jwt.RegisteredClaims
}

func ValidateGoogleJWT

func ValidateGoogleJWT(tokenString string) (GoogleClaims, error)

Jump to

Keyboard shortcuts

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