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 ¶
func (w *WatchingFileCertificateReader) ReadCertificate() ([]*x509.Certificate, crypto.PrivateKey, error)
ReadCertificate returns the cached certificate.