次の方法で共有


ICredentialProvider interface

警告

この API は非推奨になりました。

Use ConfigurationBotFrameworkAuthentication instead to configure credentials. CredentialProvider interface. This interface allows Bots to provide their own implementation of what is, and what is not, a valid appId and password. This is useful in the case of multi-tenant bots, where the bot may need to call out to a service to determine if a particular appid/password pair is valid.

For Single Tenant bots (the vast majority) the simple static providers are sufficient.

メソッド

getAppPassword(string)

特定のボット appId のアプリ パスワードを取得します。有効な appId でない場合は Null を返します。このメソッドは非同期であり、appId とパスワードのペアを検証するためにサービスを提供するために呼び出す必要があるカスタム実装を有効にします。

isAuthenticationDisabled()

ボット認証が無効になっているかどうかを確認します。 ボット認証が無効になっている場合は true を返します。 このメソッドは非同期であり、appId とパスワードのペアを検証するためにサービスを提供するために呼び出す必要があるカスタム実装を有効にします。

isValidAppId(string)

AppId を検証します。 このメソッドは非同期であり、appId とパスワードのペアを検証するためにサービスを提供するために呼び出す必要があるカスタム実装を有効にします。

メソッドの詳細

getAppPassword(string)

特定のボット appId のアプリ パスワードを取得します。有効な appId でない場合は Null を返します。このメソッドは非同期であり、appId とパスワードのペアを検証するためにサービスを提供するために呼び出す必要があるカスタム実装を有効にします。

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

パラメーター

appId

string

bot appid

戻り値

Promise<string | null>

無効な appid の場合はパスワードまたは null

isAuthenticationDisabled()

ボット認証が無効になっているかどうかを確認します。 ボット認証が無効になっている場合は true を返します。 このメソッドは非同期であり、appId とパスワードのペアを検証するためにサービスを提供するために呼び出す必要があるカスタム実装を有効にします。

function isAuthenticationDisabled(): Promise<boolean>

戻り値

Promise<boolean>

ボット認証が無効な場合は true。

isValidAppId(string)

AppId を検証します。 このメソッドは非同期であり、appId とパスワードのペアを検証するためにサービスを提供するために呼び出す必要があるカスタム実装を有効にします。

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

パラメーター

appId

string

bot appid

戻り値

Promise<boolean>

有効な AppId の場合は true