idtoken

package
v0.0.0-...-1305305 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOGGER = logging.MustGetLogger("idToken")

Functions

func CreateAndSign

func CreateAndSign(claims ClaimsIDToken, hmacSampleSecret string) (string, error)

func ResponseError

func ResponseError(w http.ResponseWriter, statusCode int, err error)

func ResponseSuccess

func ResponseSuccess(w http.ResponseWriter, msg string)

Types

type ClaimsIDToken

type ClaimsIDToken struct {
	jwt.StandardClaims
	UID   string `json:"uid"`
	Email string `json:"email"`
}

func Parse

func Parse(tokenString string) (*ClaimsIDToken, error)

type TokenSecure

type TokenSecure struct {
	Secret string `json:"secret" bson:"secret"`
	JTI    string `json:"jti" bson:"jti"`
	Number int    `json:"number" bson:"number"`
	UID    string `json:"uid" bson:"uid"`
}

Jump to

Keyboard shortcuts

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