tokenservice

package
v1.0.1-Branch-4747ef83.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ITokenService

type ITokenService interface {
	MintToken(ctx context.Context, request *MintTokenRequest) (*MintTokenResponse, error)
}

type MintTokenRequest

type MintTokenRequest struct {
	// Claims is a map of claims to be included in the token.
	// The standard claims of the token provider are added automatically.  i.e. issuer, etc
	Claims fluffycore_contracts_claims.IClaims
	// DurationLifeTimeSeconds is the duration of the token in seconds.
	// the final expiration time is calculated as NotBeforeUnix + DurationLifeTimeSeconds
	DurationLifeTimeSeconds int
	// NotBeforeUnix is the unix time in seconds that the token is not valid before.
	NotBeforeUnix int64
}

type MintTokenResponse

type MintTokenResponse struct {
	Token      string
	Expiration int64
}

Jump to

Keyboard shortcuts

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