Security

package
v0.0.0-...-6947385 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtDecoder

type JwtDecoder struct {
	SecretKey string
}

func (JwtDecoder) Decode

func (decoder JwtDecoder) Decode(tokenString string) (*UserClaims, error)

type JwtEncoder

type JwtEncoder struct {
	SecretKey     string
	SigningMethod *jwt.SigningMethodHMAC
}

func (JwtEncoder) Encode

func (encoder JwtEncoder) Encode(claims UserClaims) (string, error)

type UserClaims

type UserClaims struct {
	Id    string `json:"id"`
	First string `json:"first"`
	Last  string `json:"last"`
	Iat   int    `json:"iat"`
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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