appsecret

package
v0.0.0-...-c4f7e29 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Lifetime = duration.Short

Variables

View Source
var ErrTokenNotFound = apierrors.NotFound.WithReason("TokenNotFound").New("token not found")

Functions

This section is empty.

Types

type AppSecretVisitToken

type AppSecretVisitToken struct {
	TokenID string             `json:"token_id"`
	UserID  string             `json:"user_id"`
	Secrets []config.SecretKey `json:"secrets"`
}

func NewAppSecretVisitToken

func NewAppSecretVisitToken(userID string, secrets []config.SecretKey) *AppSecretVisitToken

type AppSecretVisitTokenStoreImpl

type AppSecretVisitTokenStoreImpl struct {
	Context context.Context
	Redis   *globalredis.Handle
}

func (*AppSecretVisitTokenStoreImpl) CreateToken

func (s *AppSecretVisitTokenStoreImpl) CreateToken(
	appID config.AppID,
	userID string,
	secrets []config.SecretKey,
) (*AppSecretVisitToken, error)

func (*AppSecretVisitTokenStoreImpl) GetTokenByID

func (s *AppSecretVisitTokenStoreImpl) GetTokenByID(
	appID config.AppID,
	tokenID string,
) (*AppSecretVisitToken, error)

Jump to

Keyboard shortcuts

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