provider

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package provider offers functionality for token providers.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedProvider = errors.New("unsupported provider")

ErrUnsupportedProvider is returned when an unsupported provider is requested.

Functions

func Register

func Register(name string, newSigner func(ctx context.Context, key string) (Provider, error))

Register registers a new provider.

func Registered

func Registered() []string

Registered returns a list of all registered providers.

Types

type Provider

type Provider interface {
	// Check checks the validity of the signer, returning an error if the signer
	// is invalid or misconfigured.
	Check() error

	// Sign signs the given claims and returns a JWT token string, as specified
	// by [jwt.Token.SignedString]
	Sign(claims jwt.Claims) (string, error)
}

Provider is the interface that must be implemented by all token providers.

func NewSigner

func NewSigner(ctx context.Context, provider, key string) (Provider, error)

NewSigner creates a new signer for the given provider.

Directories

Path Synopsis
Package aws provides the Controller struct that wraps AWS services and provides S3 and SSM functionality with context and logging support.
Package aws provides the Controller struct that wraps AWS services and provides S3 and SSM functionality with context and logging support.
Package file provides a file-based implementation of the ghait.Provider interface.
Package file provides a file-based implementation of the ghait.Provider interface.
Package gcp provides a Google Cloud Platform (GCP) KMS signer implementation.
Package gcp provides a Google Cloud Platform (GCP) KMS signer implementation.
Package stdin provides a stdin-based implementation of the ghait.Provider interface.
Package stdin provides a stdin-based implementation of the ghait.Provider interface.
Package vault provides a ghinstallation.Signer implementation using HashiCorp Vault.
Package vault provides a ghinstallation.Signer implementation using HashiCorp Vault.

Jump to

Keyboard shortcuts

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