kmsjwt

package
v0.0.0-...-03a21d3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KMSJWT

type KMSJWT struct {
	*Signer
	*Verifier
}

func New

func New(client *kms.KeyManagementClient, projectID, env, serviceName string) *KMSJWT

type Signer

type Signer struct {
	// contains filtered or unexported fields
}

func NewSigner

func NewSigner(client *kms.KeyManagementClient, projectID, env, serviceName string) *Signer

func (*Signer) Sign

func (s *Signer) Sign(ctx context.Context, expiresAt time.Time, customClaims jwtinterface.Claims) (string, error)

type Verifier

type Verifier struct {
	// contains filtered or unexported fields
}

func NewVerifier

func NewVerifier(client *kms.KeyManagementClient, projectID string) *Verifier

func (*Verifier) Verify

func (s *Verifier) Verify(ctx context.Context, token string) (claims jwtinterface.Claims, err error)

Jump to

Keyboard shortcuts

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