PasswordServiceClientCredentialFactory class

A simple implementation of the ServiceClientCredentialsFactory interface.

Constructors

PasswordServiceClientCredentialFactory(string, string)

Initializes a new instance of the PasswordServiceClientCredentialFactory class.

PasswordServiceClientCredentialFactory(string, string, string)

Initializes a new instance of the PasswordServiceClientCredentialFactory class.

Properties

appId

The app ID for this credential.

password

The app password for this credential.

tenantId

The tenant ID of the Azure AD tenant where the bot is created.

Methods

createCredentials(string, string, string, boolean)

A factory method for creating ServiceClientCredentials.

isAuthenticationDisabled()

Checks whether bot authentication is disabled.

isValidAppId(string)

Validates an app ID.

Constructor Details

PasswordServiceClientCredentialFactory(string, string)

Initializes a new instance of the PasswordServiceClientCredentialFactory class.

new PasswordServiceClientCredentialFactory(appId: string, password: string)

Parameters

appId

string

The app ID.

password

string

The app password.

PasswordServiceClientCredentialFactory(string, string, string)

Initializes a new instance of the PasswordServiceClientCredentialFactory class.

new PasswordServiceClientCredentialFactory(appId: string, password: string, tenantId: string)

Parameters

appId

string

The app ID.

password

string

The app password.

tenantId

string

Tenant ID of the Azure AD tenant where the bot is created.

Property Details

appId

The app ID for this credential.

appId: string | null

Property Value

string | null

password

The app password for this credential.

password: string | null

Property Value

string | null

tenantId

The tenant ID of the Azure AD tenant where the bot is created.

tenantId: string | null

Property Value

string | null

Method Details

createCredentials(string, string, string, boolean)

A factory method for creating ServiceClientCredentials.

function createCredentials(appId: string, audience: string, loginEndpoint: string, validateAuthority: boolean): Promise<ServiceClientCredentials>

Parameters

appId

string

The appId.

audience

string

The audience.

loginEndpoint

string

The login url.

validateAuthority

boolean

The validate authority value to use.

Returns

Promise<ServiceClientCredentials>

A Promise representing the result of the operation.

isAuthenticationDisabled()

Checks whether bot authentication is disabled.

function isAuthenticationDisabled(): Promise<boolean>

Returns

Promise<boolean>

Promise with the validation result.

isValidAppId(string)

Validates an app ID.

function isValidAppId(appId?: string): Promise<boolean>

Parameters

appId

string

The appId to validate.

Returns

Promise<boolean>

Promise with the validation result.