Condividi tramite


MSIVmTokenCredentials class

Fornisce informazioni sulle credenziali del token di identità del servizio gestito in una macchina virtuale di cui è stato effettuato il provisioning in Azure.

Extends

Costruttori

MSIVmTokenCredentials(MSIVmOptions)

Proprietà

apiVersion
clientId
httpMethod
identityId
msiEndpoint
objectId

Proprietà ereditate

resource

Endpoint delle risorse di Azure.

  • Il valore predefinito è Azure Resource Manager dall'ambiente: AzureCloud. "https://management.azure.com/"
  • Per ServiceManagement (ASM): "https://management.core.windows.net/"
  • Per Azure KeyVault: "https://vault.azure.net"
  • Per Azure Batch: "https://batch.core.windows.net"
  • Per Azure Active Directory Graph: "https://graph.windows.net"

Metodi

getToken()

Prepara e invia una richiesta POST a un endpoint di servizio ospitato nella macchina virtuale di Azure, che risponde con il token di accesso.

Metodi ereditati

parseTokenResponse(string)

Analizza una stringa json tokenResponse in un oggetto e converte le proprietà nel primo livello in camelCase. Questo metodo tenta di standardizzare il tokenResponse

signRequest(WebResource)

Firma una richiesta con l'intestazione Authentication.

Dettagli costruttore

MSIVmTokenCredentials(MSIVmOptions)

new MSIVmTokenCredentials(options?: MSIVmOptions)

Parametri

options
MSIVmOptions

Dettagli proprietà

apiVersion

apiVersion: string

Valore della proprietà

string

clientId

clientId?: string

Valore della proprietà

string

httpMethod

httpMethod: HttpMethods

Valore della proprietà

identityId

identityId?: string

Valore della proprietà

string

msiEndpoint

msiEndpoint: string

Valore della proprietà

string

objectId

objectId?: string

Valore della proprietà

string

Dettagli proprietà ereditate

resource

Endpoint delle risorse di Azure.

  • Il valore predefinito è Azure Resource Manager dall'ambiente: AzureCloud. "https://management.azure.com/"
  • Per ServiceManagement (ASM): "https://management.core.windows.net/"
  • Per Azure KeyVault: "https://vault.azure.net"
  • Per Azure Batch: "https://batch.core.windows.net"
  • Per Azure Active Directory Graph: "https://graph.windows.net"
resource: string

Valore della proprietà

string

Ereditato daMSITokenCredentials.resource

Dettagli metodo

getToken()

Prepara e invia una richiesta POST a un endpoint di servizio ospitato nella macchina virtuale di Azure, che risponde con il token di accesso.

function getToken(): Promise<MSITokenResponse>

Restituisce

Promise<MSITokenResponse>

Promise con tokenResponse (tokenType e accessToken sono le due proprietà importanti).

Dettagli dei metodi ereditati

parseTokenResponse(string)

Analizza una stringa json tokenResponse in un oggetto e converte le proprietà nel primo livello in camelCase. Questo metodo tenta di standardizzare il tokenResponse

function parseTokenResponse(body: string): TokenResponse

Parametri

body

string

Stringa JSON

Restituisce

TokenResponse

TokenResponse (tokenType e accessToken sono le due proprietà importanti).

Ereditato daMSITokenCredentials.parseTokenResponse

signRequest(WebResource)

Firma una richiesta con l'intestazione Authentication.

function signRequest(webResource: WebResource): Promise<WebResource>

Parametri

webResource
WebResource

Oggetto WebResource da firmare.

Restituisce

Promise<WebResource>

Promessa con webResource firmato.

Ereditato daMSITokenCredentials.signRequest