auth

package
v0.0.0-...-532179e Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccessTokenDuration  = 15 * time.Minute
	RefreshTokenDuration = time.Hour
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Kind    Kind
	Expires time.Time
	Token   string
}

func NewAuth

func NewAuth(key string, kind Kind) (*Auth, error)

func (*Auth) String

func (token *Auth) String() string

type Claims

type Claims struct {
	jwt.RegisteredClaims

	Kind Kind `json:"kind"`
}

type Kind

type Kind string
const (
	KindAccess  Kind = "ACCESS"
	KindRefresh Kind = "REFRESH"
)

Jump to

Keyboard shortcuts

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