UsernamePasswordClient class

警告

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

  • Use a more secure flow instead

Oauth2.0 パスワード付与クライアント 注: パスワード付与と純粋なテスト目的でのみパブリック クライアントをサポートしています

Extends
@azure/msal-common.BaseClient

継承されたプロパティ

authority
logger

メソッド

acquireToken(CommonUsernamePasswordRequest)

資格情報を使用してサービスにユーザー名とパスワードを渡してトークンを取得する API password_grant

継承されたメソッド

createTokenQueryParameters(BaseAuthRequest)

/token 要求のクエリ文字列を作成します

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

必要なプレフライトおよびポストフライト ロジックで sendPostRequestAsync をラップします

updateAuthority(string, string)

クライアントの authority オブジェクトを更新します。 エンドポイントの検出を完了する必要があります。

コンストラクターの詳細

UsernamePasswordClient(ClientConfiguration)

new UsernamePasswordClient(configuration: ClientConfiguration)

パラメーター

configuration
@azure/msal-common.ClientConfiguration

継承されたプロパティの詳細

authority

authority: Authority

プロパティ値

@azure/msal-common.Authority

Inherited From BaseClient.authority

logger

logger: Logger

プロパティ値

Inherited From BaseClient.logger

メソッドの詳細

acquireToken(CommonUsernamePasswordRequest)

資格情報を使用してサービスにユーザー名とパスワードを渡してトークンを取得する API password_grant

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

パラメーター

request
CommonUsernamePasswordRequest

CommonUsernamePasswordRequest

返品

Promise<null | AuthenticationResult>

継承済みメソッドの詳細

createTokenQueryParameters(BaseAuthRequest)

/token 要求のクエリ文字列を作成します

function createTokenQueryParameters(request: BaseAuthRequest): string

パラメーター

request
BaseAuthRequest

返品

string

Inherited From BaseClient.createTokenQueryParameters

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

必要なプレフライトおよびポストフライト ロジックで sendPostRequestAsync をラップします

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

パラメーター

thumbprint
RequestThumbprint

調整のために拇印を要求する

tokenEndpoint

string

POST を作成するエンドポイント

options
NetworkRequestOptions

POST 要求に含める本文とヘッダー

correlationId

string

テレメトリの CorrelationId

返品

Promise<NetworkResponse<T>>

Inherited From BaseClient.sendPostRequest

updateAuthority(string, string)

クライアントの authority オブジェクトを更新します。 エンドポイントの検出を完了する必要があります。

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

パラメーター

cloudInstanceHostname

string

correlationId

string

返品

Promise<void>

Inherited From BaseClient.updateAuthority