Share via


RequireHttpsAttribute.OnAuthorization(AuthorizationFilterContext) Method

Definition

Called early in the filter pipeline to confirm request is authorized. Confirms requests are received over HTTPS. Takes no action for HTTPS requests. Otherwise if it was a GET request, sets Result to a result which will redirect the client to the HTTPS version of the request URI. Otherwise, sets Result to a result which will set the status code to 403 (Forbidden).

public:
 virtual void OnAuthorization(Microsoft::AspNetCore::Mvc::Filters::AuthorizationFilterContext ^ filterContext);
public virtual void OnAuthorization (Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext filterContext);
abstract member OnAuthorization : Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext -> unit
override this.OnAuthorization : Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext -> unit
Public Overridable Sub OnAuthorization (filterContext As AuthorizationFilterContext)

Parameters

Implements

Applies to