impl

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCreatingToken = errors.New("error creating token")

Functions

func NewJwtToken

func NewJwtToken(clock clock.Clock) (itbasisJwtToken.JwtToken, error)

func NewJwtTokenCustomConfig

func NewJwtTokenCustomConfig(clock clock.Clock, config itbasisJwtToken.Config) (itbasisJwtToken.JwtToken, error)

Types

type JwtTokenImpl

type JwtTokenImpl struct {
	itbasisJwtToken.JwtToken
	// contains filtered or unexported fields
}

func (*JwtTokenImpl) CreateAccessToken

func (receiver *JwtTokenImpl) CreateAccessToken(ctx context.Context, sessionUser model.SessionUser) (string, *time.Time, error)

func (*JwtTokenImpl) CreateRefreshToken added in v0.0.7

func (receiver *JwtTokenImpl) CreateRefreshToken(ctx context.Context, sessionUser model.SessionUser) (string, *time.Time, error)

func (*JwtTokenImpl) CreateTokenCustomDuration added in v0.0.7

func (receiver *JwtTokenImpl) CreateTokenCustomDuration(ctx context.Context, sessionUser model.SessionUser, expiredAtDuration time.Duration) (
	string,
	*time.Time,
	error,
)

func (*JwtTokenImpl) Parse

func (receiver *JwtTokenImpl) Parse(ctx context.Context, tokenString string) (*model.SessionUser, error)

func (*JwtTokenImpl) SetSecretKey

func (receiver *JwtTokenImpl) SetSecretKey(secretKey []byte, signMethod jwt.SigningMethod)

Jump to

Keyboard shortcuts

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