google

package
v0.0.0-...-fbda54b Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorPublicKeyUnavailable = errors.New("public key couldn't be retrieved")
	ErrorInvalidToken         = errors.New("token couldn't be parsed or validated")
	ErrorInvalidIssuer        = errors.New("incorrect issuer claim")
)

Functions

This section is empty.

Types

type GoogleTokenClaims

type GoogleTokenClaims struct {
	FirstName     string `json:"given_name"`
	LastName      string `json:"family_name"`
	PhotoUrl      string `json:"picture"`
	Name          string `json:"name"`
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
	jwt.StandardClaims
}

func GetIdentityFromToken

func GetIdentityFromToken(token string) (*GoogleTokenClaims, error)

type JSONWebKey

type JSONWebKey struct {
	Kty string `json:"kty"`
	Kid string `json:"kid"`
	E   string `json:"e"`
	Alg string `json:"alg"`
	Use string `json:"use"`
	N   string `json:"n"`
}

type JSONWebKeys

type JSONWebKeys struct {
	Keys []JSONWebKey `json:"keys"`
}

Jump to

Keyboard shortcuts

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