DeviceCodeClient class

OAuth2.0 Cihaz kodu istemcisi

Extends
@azure/msal-common.BaseClient

Devralınan Özellikler

authority
logger

Yöntemler

acquireToken(CommonDeviceCodeRequest)

Cihaz kodu uç noktasından cihaz kodunu alır, cihaz kodu yanıtıyla geri çağırır ve belirteçler için cihaz kodunu değiştirmek üzere belirteç uç noktasını yoklar

createExtraQueryParameters(CommonDeviceCodeRequest)

Cihaz kodu isteği için sorgu dizesi oluşturur

Devralınan Yöntemler

createTokenQueryParameters(BaseAuthRequest)

/token isteği için sorgu dizesi oluşturur

sendPostRequest<T>(RequestThumbprint, string, NetworkRequestOptions, string)

sendPostRequestAsync'i gerekli ön kontrol ve postflight mantığıyla sarmalar

updateAuthority(string, string)

İstemcinin authority nesnesini güncelleştirir. Uç nokta bulma işlemi tamamlanmalıdır.

Oluşturucu Ayrıntıları

DeviceCodeClient(ClientConfiguration)

new DeviceCodeClient(configuration: ClientConfiguration)

Parametreler

configuration
@azure/msal-common.ClientConfiguration

Devralınan Özellik Detayları

authority

authority: Authority

Özellik Değeri

@azure/msal-common.Authority

Devralınan BaseClient.authority

logger

logger: Logger

Özellik Değeri

Devralınan BaseClient.logger

Yöntem Ayrıntıları

acquireToken(CommonDeviceCodeRequest)

Cihaz kodu uç noktasından cihaz kodunu alır, cihaz kodu yanıtıyla geri çağırır ve belirteçler için cihaz kodunu değiştirmek üzere belirteç uç noktasını yoklar

function acquireToken(request: CommonDeviceCodeRequest): Promise<null | AuthenticationResult>

Parametreler

request
CommonDeviceCodeRequest

geliştirici tarafından sağlanan CommonDeviceCodeRequest

Döndürülenler

Promise<null | AuthenticationResult>

createExtraQueryParameters(CommonDeviceCodeRequest)

Cihaz kodu isteği için sorgu dizesi oluşturur

function createExtraQueryParameters(request: CommonDeviceCodeRequest): string

Parametreler

request
CommonDeviceCodeRequest

geliştirici tarafından sağlanan CommonDeviceCodeRequest

Döndürülenler

string

Devralınan Yöntemin Ayrıntıları

createTokenQueryParameters(BaseAuthRequest)

/token isteği için sorgu dizesi oluşturur

function createTokenQueryParameters(request: BaseAuthRequest): string

Parametreler

request
BaseAuthRequest

Döndürülenler

string

Devralınan BaseClient.createTokenQueryParameters

sendPostRequest<T>(RequestThumbprint, string, NetworkRequestOptions, string)

sendPostRequestAsync'i gerekli ön kontrol ve postflight mantığıyla sarmalar

function sendPostRequest<T>(thumbprint: RequestThumbprint, tokenEndpoint: string, options: NetworkRequestOptions, correlationId: string): Promise<NetworkResponse<T>>

Parametreler

thumbprint
RequestThumbprint

Azaltma için parmak izi isteme

tokenEndpoint

string

POST yapmak için uç nokta

options
NetworkRequestOptions

POST isteğine eklenecek gövde ve üst bilgiler

correlationId

string

Telemetri için CorrelationId

Döndürülenler

Promise<NetworkResponse<T>>

Devralınan BaseClient.sendPostRequest

updateAuthority(string, string)

İstemcinin authority nesnesini güncelleştirir. Uç nokta bulma işlemi tamamlanmalıdır.

function updateAuthority(cloudInstanceHostname: string, correlationId: string): Promise<void>

Parametreler

cloudInstanceHostname

string

correlationId

string

Döndürülenler

Promise<void>

Devralınan Kaynak BaseClient.updateAuthority