auth

package
v0.0.0-...-2b71c33 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthRequired

func AuthRequired(c *gin.Context)

validate JWT

func SetClaim

func SetClaim(user_id int64, is_google_user bool) (string, error)

generate JWT

Types

type Claims

type Claims struct {
	User         int64 `json:"user_id"`
	IsGoogleUser bool  `json:"is_google_user"`
	jwt.StandardClaims
}

custom claims

Jump to

Keyboard shortcuts

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