workloadidentity

package
v1.101.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTokenIssuer

func NewTokenIssuer(signingKey any, issuer string, minDuration, maxDuration int64) (*tokenIssuer, error)

NewTokenIssuer creates new JSON Web Token issuer.

Types

type TokenIssuer

type TokenIssuer interface {
	// IssueToken generates JSON Web Token based on the provided subject, audiences, duration and claims.
	// It returns the token and its expiration time if successfully generated
	IssueToken(sub string, aud []string, duration int64, claims ...any) (string, *time.Time, error)
}

TokenIssuer is an interface for JSON Web Token issuers.

Jump to

Keyboard shortcuts

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