token_helper

package
v1.2.14 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DEFAULT_REFRESH_PERIOD  = 12 * time.Hour
	MIN_REFRESH_PERIOD      = 15 * time.Second
	MAX_REFRESH_PERIOD      = 8 * time.Minute
	MAX_RETRY_REFRESH_COUNT = int64(12)
)

Functions

This section is empty.

Types

type TokenValidator

type TokenValidator interface {
	Validate(ctx context.Context, token string) (*identityd2_pb.Token, error)
}

func NewTokenValidator

func NewTokenValidator(
	tknr Tokener,
	cli_fty *client_helper.ClientFactory,
	logger log.FieldLogger) TokenValidator

type Tokener

type Tokener interface {
	GetToken() string
}

func NewNoExpireTokener

func NewNoExpireTokener(cli_fty *client_helper.ClientFactory, credential_domain, credential_id, credential_secret string, logger logrus.FieldLogger) (Tokener, error)

func NewTokener

func NewTokener(cli_fty *client_helper.ClientFactory, credential_domain, credential_id, credential_secret string, logger log.FieldLogger) (Tokener, error)

Jump to

Keyboard shortcuts

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