RequireHttpsAttribute.OnAuthorization(AuthorizationFilterContext) 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.
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
- filterContext
- AuthorizationFilterContext