AppServicesAuthenticationTokenAcquisition.ReplyForbiddenWithWwwAuthenticateHeader Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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)
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.