PasswordServiceClientCredentialFactory class
A simple implementation of the ServiceClientCredentialsFactory interface.
Constructors
Password |
Initializes a new instance of the PasswordServiceClientCredentialFactory class. |
Password |
Initializes a new instance of the PasswordServiceClientCredentialFactory class. |
Properties
app |
The app ID for this credential. |
password | The app password for this credential. |
tenant |
The tenant ID of the Azure AD tenant where the bot is created. |
Methods
create |
A factory method for creating ServiceClientCredentials. |
is |
Checks whether bot authentication is disabled. |
is |
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.