UNPKG

botframework-connector

Version:

Bot Connector is autorest generated connector client.

67 lines (66 loc) 3.54 kB
/** * @module botframework-connector */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { ServiceClientCredentials } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { ServiceClientCredentialsFactory } from './serviceClientCredentialsFactory'; /** * A Certificate implementation of the [ServiceClientCredentialsFactory](xref:botframework-connector.ServiceClientCredentialsFactory) abstract class. */ export declare class CertificateServiceClientCredentialsFactory extends ServiceClientCredentialsFactory { private readonly appId; private readonly certificateThumbprint; private readonly certificatePrivateKey; private readonly tenantId; private readonly x5c; /** * Initializes a new instance of the CertificateServiceClientCredentialsFactory class. * * @param appId Microsoft application Id related to the certificate. * @param certificateThumbprint A hex encoded thumbprint of the certificate. * @param certificatePrivateKey A PEM encoded certificate private key. * @param tenantId Tenant ID of the Azure AD tenant where the bot is created. * - Required for SingleTenant app types. * - Optional for MultiTenant app types. **Note**: '_botframework.com_' is the default tenant when no value is provided. * * More information: https://learn.microsoft.com/en-us/security/zero-trust/develop/identity-supported-account-types. * @param x5c Optional. Enables application developers to achieve easy certificates roll-over in Azure AD: * set this parameter to send the public certificate (BEGIN CERTIFICATE) to Azure AD, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. */ constructor(appId: string, certificateThumbprint: string, certificatePrivateKey: string, tenantId?: string, x5c?: string); /** * Initializes a new instance of the CertificateServiceClientCredentialsFactory class. * * @param appId Microsoft application Id related to the certificate. * @param x5c Value that enables application developers to achieve easy certificates roll-over in Azure AD * set this parameter to send the public certificate (BEGIN CERTIFICATE) to Azure AD, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. * @param certificatePrivateKey A PEM encoded certificate private key. * @param tenantId Tenant ID of the Azure AD tenant where the bot is created. * - Required for SingleTenant app types. * - Optional for MultiTenant app types. **Note**: '_botframework.com_' is the default tenant when no value is provided. * * More information: https://learn.microsoft.com/en-us/security/zero-trust/develop/identity-supported-account-types. */ constructor(appId: string, x5c: string, certificatePrivateKey: string, tenantId?: string); /** * @inheritdoc */ isValidAppId(appId: string): Promise<boolean>; /** * @param cert Value with the certificate content. * @returns The thumbprint value calculated from the cert content. */ private getThumbprint; /** * @inheritdoc */ isAuthenticationDisabled(): Promise<boolean>; /** * @inheritdoc */ createCredentials(appId: string, audience: string): Promise<ServiceClientCredentials>; } //# sourceMappingURL=certificateServiceClientCredentialsFactory.d.ts.map