passport

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: BSD-3-Clause Imports: 3 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims added in v0.3.2

type Claims struct {
	UserId string
	jwt.RegisteredClaims
}

type Option

type Option func(x *Passport)

func SetKey added in v0.3.2

func SetKey(v string) Option

func SetNamespace added in v0.3.2

func SetNamespace(v string) Option

type Passport

type Passport struct {
	Namespace string
	Key       string
}

func New

func New(options ...Option) *Passport

func (*Passport) Create

func (x *Passport) Create(userId string, jti string) (tokenString string, err error)

func (*Passport) Verify

func (x *Passport) Verify(tokenString string) (claims Claims, err error)

Jump to

Keyboard shortcuts

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