다음을 통해 공유


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입니다.