SimpleCredentialProvider class
Warning
This API is now deprecated.
Use ConfigurationBotFrameworkAuthentication
instead to configure credentials.
A simple implementation of the ICredentialProvider interface.
Constructors
Simple |
Initializes a new instance of the SimpleCredentialProvider class with the provided credentials. |
Methods
get |
Get the app password for a given bot appId, if it is not a valid appId, return Null This method is async to enable custom implementations that may need to call out to serviced to validate the appId / password pair. |
is |
Checks if bot authentication is disabled. Return true if bot authentication is disabled. This method is async to enable custom implementations that may need to call out to serviced to validate the appId / password pair. |
is |
Validate AppId. This method is async to enable custom implementations that may need to call out to service to validate the appId / password pair. |
Constructor Details
SimpleCredentialProvider(string, string)
Initializes a new instance of the SimpleCredentialProvider class with the provided credentials.
new SimpleCredentialProvider(appId: string, appPassword: string)
Parameters
- appId
-
string
The app ID.
- appPassword
-
string
The app password.
Method Details
getAppPassword(string)
Get the app password for a given bot appId, if it is not a valid appId, return Null This method is async to enable custom implementations that may need to call out to serviced to validate the appId / password pair.
function getAppPassword(appId: string): Promise<string | null>
Parameters
- appId
-
string
bot appid
Returns
Promise<string | null>
password or null for invalid appid
isAuthenticationDisabled()
Checks if bot authentication is disabled. Return true if bot authentication is disabled. This method is async to enable custom implementations that may need to call out to serviced to validate the appId / password pair.
function isAuthenticationDisabled(): Promise<boolean>
Returns
Promise<boolean>
true if bot authentication is disabled.
isValidAppId(string)
Validate AppId. This method is async to enable custom implementations that may need to call out to service to validate the appId / password pair.
function isValidAppId(appId: string): Promise<boolean>
Parameters
- appId
-
string
bot appid
Returns
Promise<boolean>
true if it is a valid AppId