CertificateSubjectTokenSupplier

CertificateSubjectTokenSupplier

A subject token supplier that uses a client certificate for authentication. It provides the certificate chain as the subject token for identity federation.

Constructor

new CertificateSubjectTokenSupplier(opts)

Initializes a new instance of the CertificateSubjectTokenSupplier.

Parameters:
Name Type Description
opts

The configuration options for the supplier.

Methods

(async) createMtlsHttpsAgent()

Creates an HTTPS agent configured with the client certificate and private key for mTLS.

Returns:
Type Description

An mTLS-configured https.Agent.

(async) getSubjectToken()

Constructs the subject token, which is the base64-encoded certificate chain.

Returns:
Type Description

A promise that resolves with the subject token.