ServiceClientCredentialsFactory class
The ServiceClientCredentialsFactory abstract class that allows Bots to provide their own ServiceClientCredentials for bot to bot channel or skill bot to parent bot calls.
Methods
create |
A factory method for creating ServiceClientCredentials. |
is |
Checks whether bot authentication is disabled. |
is |
Validates an app ID. |
Method Details
createCredentials(string, string | undefined, string, boolean)
A factory method for creating ServiceClientCredentials.
function createCredentials(appId: string, audience: string | undefined, loginEndpoint: string, validateAuthority: boolean): Promise<ServiceClientCredentials>
Parameters
- appId
-
string
The appId.
- audience
-
string | undefined
The audience.
- loginEndpoint
-
string
The login url.
- validateAuthority
-
boolean
The validate authority value to use.
Returns
Promise<ServiceClientCredentials>
isAuthenticationDisabled()
Checks whether bot authentication is disabled.
function isAuthenticationDisabled(): Promise<boolean>
Returns
Promise<boolean>
If bot authentication is disabled, the result is true; otherwise, false.
isValidAppId(string)
Validates an app ID.
function isValidAppId(appId: string): Promise<boolean>
Parameters
- appId
-
string
The app ID to validate.
Returns
Promise<boolean>
The result is true if appId
is valid for the controller; otherwise, false.