token

package
v0.1.4-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenService

type TokenService struct {
	KeyService           keys.KeyService
	Iss                  string
	AccessTokenLifetime  time.Duration
	RefreshTokenLifetime time.Duration
}

func (*TokenService) IssueTokens

func (t *TokenService) IssueTokens(username string, privateKey *rsa.PrivateKey) (*Tokens, error)

func (*TokenService) VerifyRefreshToken

func (t *TokenService) VerifyRefreshToken(token string, jwkSets keys.JWKSets) (*string, error)

type Tokens

type Tokens struct {
	AccessToken  string `json:"access"`
	RefreshToken string `json:"refresh"`
}

Jump to

Keyboard shortcuts

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