jwt

package
v0.0.0-...-4f702ff Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	*jwt.RegisteredClaims
	*TokenData
	AccessToken string
}

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(signingKey string, expirationInHours uint) *Repository

func (Repository) NewTokenWithData

func (r Repository) NewTokenWithData(data *TokenData) (*Token, error)

func (Repository) ParseStringToken

func (r Repository) ParseStringToken(accessToken string) (*Token, error)

type Token

type Token struct {
	// contains filtered or unexported fields
}

func (Token) GenerateStringToken

func (t Token) GenerateStringToken() (string, error)

func (Token) GetClaims

func (t Token) GetClaims() *Claims

func (Token) GetData

func (t Token) GetData() *TokenData

type TokenData

type TokenData struct {
	SessionID string
	User      *user.User
}

Jump to

Keyboard shortcuts

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