fpa

package
v0.0.0-...-3b811a6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateReader

type CertificateReader interface {
	// ReadCertificate reads and parses the certificate and private key.
	ReadCertificate() ([]*x509.Certificate, crypto.PrivateKey, error)
}

CertificateReader represents a source that can read and parse certificate data.

type FileCertificateReader

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

FileCertificateReader implements CertificateReader for file-based certificates.

func NewFileCertificateReader

func NewFileCertificateReader(filePath string) *FileCertificateReader

NewFileCertificateReader creates a new file-based certificate reader.

func (*FileCertificateReader) ReadCertificate

func (f *FileCertificateReader) ReadCertificate() ([]*x509.Certificate, crypto.PrivateKey, error)

ReadCertificate reads and parses the certificate from the file.

type FirstPartyApplicationTokenCredentialRetriever

type FirstPartyApplicationTokenCredentialRetriever interface {
	RetrieveCredential(tenantId string, additionallyAllowedTenants ...string) (azcore.TokenCredential, error)
}

func NewFirstPartyApplicationTokenCredentialRetriever

func NewFirstPartyApplicationTokenCredentialRetriever(logger *slog.Logger, clientID string, certReader CertificateReader, clientOptions azcore.ClientOptions) (FirstPartyApplicationTokenCredentialRetriever, error)

type WatchingFileCertificateReader

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

WatchingFileCertificateReader wraps FileCertificateReader with caching and automatic reloading. It watches the certificate file and reloads when changes are detected.

func NewWatchingFileCertificateReader

func NewWatchingFileCertificateReader(ctx context.Context, filePath string, checkInterval time.Duration, logger *slog.Logger) (*WatchingFileCertificateReader, error)

NewWatchingFileCertificateReader creates a new watching certificate reader. It loads the initial certificate and starts watching for changes.

func (*WatchingFileCertificateReader) ReadCertificate

ReadCertificate returns the cached certificate.

Jump to

Keyboard shortcuts

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