jwt

package
v0.0.0-...-cfcff58 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWTokens

func GenerateJWTokens(uid int) (accessToken string, refreshToken string, err error)

GenerateJWTokens генерирует пару access и refresh токенов

Types

type AandaClaims

type AandaClaims struct {
	Uid int `json:"uid,omitempty"`
	Jti int `json:"jti,omitempty"`
	jwt.StandardClaims
}

func ExtractTokenMetadata

func ExtractTokenMetadata(accessToken string) (claims *AandaClaims, err error)

ExtractTokenMetadata валuдирует и декодирует информацию из токена

Jump to

Keyboard shortcuts

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