共用方式為


SimpleCredentialProvider class

警告

此 API 現已淘汰。

Use ConfigurationBotFrameworkAuthentication instead to configure credentials. A simple implementation of the ICredentialProvider interface.

建構函式

SimpleCredentialProvider(string, string)

使用提供的認證,初始化 SimpleCredentialProvider 類別的新實例。

方法

getAppPassword(string)

取得指定 Bot appId 的應用程式密碼,如果不是有效的 appId,則傳回 Null 此方法是異步的,以啟用可能需要呼叫 Serviced 的自定義實作,以驗證 appId /密碼組。

isAuthenticationDisabled()

檢查 Bot 驗證是否已停用。 如果已停用 Bot 驗證,則傳回 true。 此方法是異步方法,可啟用可能需要呼叫 serviced 的自定義實作,以驗證 appId / 密碼組。

isValidAppId(string)

驗證AppId。 此方法是異步的,可啟用可能需要呼叫服務以驗證 appId / 密碼組的自定義實作。

建構函式詳細資料

SimpleCredentialProvider(string, string)

使用提供的認證,初始化 SimpleCredentialProvider 類別的新實例。

new SimpleCredentialProvider(appId: string, appPassword: string)

參數

appId

string

應用程式識別碼。

appPassword

string

應用程式密碼。

方法詳細資料

getAppPassword(string)

取得指定 Bot appId 的應用程式密碼,如果不是有效的 appId,則傳回 Null 此方法是異步的,以啟用可能需要呼叫 Serviced 的自定義實作,以驗證 appId /密碼組。

function getAppPassword(appId: string): Promise<string | null>

參數

appId

string

bot appid

傳回

Promise<string | null>

無效 appid 的密碼或 null

isAuthenticationDisabled()

檢查 Bot 驗證是否已停用。 如果已停用 Bot 驗證,則傳回 true。 此方法是異步方法,可啟用可能需要呼叫 serviced 的自定義實作,以驗證 appId / 密碼組。

function isAuthenticationDisabled(): Promise<boolean>

傳回

Promise<boolean>

如果已停用 Bot 驗證,則為 true。

isValidAppId(string)

驗證AppId。 此方法是異步的,可啟用可能需要呼叫服務以驗證 appId / 密碼組的自定義實作。

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

參數

appId

string

bot appid

傳回

Promise<boolean>

如果它是有效的 AppId,則為 true