Language

AppServicesAuthenticationTokenAcquisition.ReplyForbiddenWithWwwAuthenticateHeader メソッド

定義

Web API で使用されます (そのため、ユーザーとの対話はできません)。 HttpResponse を介してクライアントに応答するには、403 (禁止) を送信し、wwwAuthenticateHeaders を設定して、クライアントがユーザーとの対話をトリガーして、ユーザーがより多くのスコープに同意できるようにします。

public void ReplyForbiddenWithWwwAuthenticateHeader(System.Collections.Generic.IEnumerable<string> scopes, Microsoft.Identity.Client.MsalUiRequiredException msalServiceException, string? authenticationScheme, Microsoft.AspNetCore.Http.HttpResponse? httpResponse = default);
abstract member ReplyForbiddenWithWwwAuthenticateHeader : seq<string> * Microsoft.Identity.Client.MsalUiRequiredException * string * Microsoft.AspNetCore.Http.HttpResponse -> unit
override this.ReplyForbiddenWithWwwAuthenticateHeader : seq<string> * Microsoft.Identity.Client.MsalUiRequiredException * string * Microsoft.AspNetCore.Http.HttpResponse -> unit
Public Sub ReplyForbiddenWithWwwAuthenticateHeader (scopes As IEnumerable(Of String), msalServiceException As MsalUiRequiredException, authenticationScheme As String, Optional httpResponse As HttpResponse = Nothing)

パラメーター

scopes
IEnumerable<String>

同意するスコープ。

msalServiceException
MsalUiRequiredException

MsalUiRequiredException チャレンジをトリガーします。

authenticationScheme
String

認証スキーム。 null の場合は、Web アプリから呼び出された場合は OpenIdConnectDefault.AuthenticationScheme、Web API から呼び出された場合は JwtBearerDefault.AuthenticationScheme が使用されます。

httpResponse
HttpResponse

更新する HttpResponse 。

実装

適用対象