auth

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 4 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

	UserId string `json:"userId,omitempty"`
}

type Service

type Service interface {
	Sign(userId string) (tokenString string, expiresIn time.Duration, expiresAt time.Time, err error)
	Parse(tokenString string) (string, error)
}

func NewService

func NewService(method jwt.SigningMethod, privateKey interface{}, publicKey interface{}, sessionDuration time.Duration) Service

Jump to

Keyboard shortcuts

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