auth

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAccessToken

func GenerateAccessToken(privateKey crypto.PrivateKey, claims Claims) (string, error)

Types

type Claims

type Claims struct {
	UserID     string `json:"uid,omitempty"`
	SessionID  string `json:"sid,omitempty"`
	SuperAdmin bool   `json:"adm,omitempty"`
	jwt.RegisteredClaims
}

func VerifyAccessToken

func VerifyAccessToken(publicKey crypto.PublicKey, accessToken string) (*Claims, error)

Jump to

Keyboard shortcuts

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