Partager via


ITokenAcquisition.ReplyForbiddenWithWwwAuthenticateHeader Method

Definition

Overloads

ReplyForbiddenWithWwwAuthenticateHeader(IEnumerable<String>, MsalUiRequiredException, HttpResponse)

Used in web APIs (which therefore cannot have an interaction with the user). Replies to the client through the HttpResponse by sending a 403 (forbidden) and populating wwwAuthenticateHeaders so that the client can trigger an interaction with the user so the user can consent to more scopes.

ReplyForbiddenWithWwwAuthenticateHeader(IEnumerable<String>, MsalUiRequiredException, String, HttpResponse)

Used in web APIs (which therefore cannot have an interaction with the user). Replies to the client through the HttpResponse by sending a 403 (forbidden) and populating wwwAuthenticateHeaders so that the client can trigger an interaction with the user so the user can consent to more scopes.

ReplyForbiddenWithWwwAuthenticateHeader(IEnumerable<String>, MsalUiRequiredException, HttpResponse)

Used in web APIs (which therefore cannot have an interaction with the user). Replies to the client through the HttpResponse by sending a 403 (forbidden) and populating wwwAuthenticateHeaders so that the client can trigger an interaction with the user so the user can consent to more scopes.

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

Parameters

scopes
IEnumerable<String>

Scopes to consent to.

msalServiceException
MsalUiRequiredException

MsalUiRequiredException triggering the challenge.

httpResponse
HttpResponse

The HttpResponse to update.

Applies to

ReplyForbiddenWithWwwAuthenticateHeader(IEnumerable<String>, MsalUiRequiredException, String, HttpResponse)

Used in web APIs (which therefore cannot have an interaction with the user). Replies to the client through the HttpResponse by sending a 403 (forbidden) and populating wwwAuthenticateHeaders so that the client can trigger an interaction with the user so the user can consent to more scopes.

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
Public Sub ReplyForbiddenWithWwwAuthenticateHeader (scopes As IEnumerable(Of String), msalServiceException As MsalUiRequiredException, authenticationScheme As String, Optional httpResponse As HttpResponse = Nothing)

Parameters

scopes
IEnumerable<String>

Scopes to consent to.

msalServiceException
MsalUiRequiredException

MsalUiRequiredException triggering the challenge.

authenticationScheme
String

Authentication scheme. If null, will use OpenIdConnectDefault.AuthenticationScheme if called from a web app, and JwtBearerDefault.AuthenticationScheme if called from a web API.

httpResponse
HttpResponse

The HttpResponse to update.

Applies to