jwt

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SdtClaims

type SdtClaims struct {
	Name string `json:"name"`
	Role string `json:"role"`
	jwt_lib.StandardClaims
}

SdtClaims defines the custom claims

type Utils

type Utils struct {
}

func (*Utils) GenerateJWT

func (u *Utils) GenerateJWT(name string, role string) (string, error)

GenerateJWT generates token from the given information

func (*Utils) ValidateObjectID

func (u *Utils) ValidateObjectID(id string) error

ValidateObjectID checks the given ID if it's an object id or not

Jump to

Keyboard shortcuts

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