passport

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 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 SetIssuer added in v0.6.1

func SetIssuer(v string) Option

func SetKey added in v0.3.2

func SetKey(v string) Option

type Passport

type Passport struct {
	Issuer string
	Key    string
}

func New

func New(options ...Option) *Passport

func (*Passport) Create

func (x *Passport) Create(userId string, jti string, expire time.Duration) (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