C# Class Decision.Common.Filters.RedirectToHttpsAttribute

Inheritance: System.Web.Mvc.FilterAttribute, IAuthorizationFilter
Afficher le fichier Open project: rabbal/Decision

Méthodes publiques

Méthode Description
OnAuthorization ( System.Web.Mvc.AuthorizationContext filterContext ) : void

Determines whether a request is secured (HTTPS) and, if it is not, calls the HandleNonHttpsRequest method.

RedirectToHttpsAttribute ( bool permanent ) : System

Initializes a new instance of the RedirectToHttpsAttribute class.

Méthodes protégées

Méthode Description
HandleNonHttpsRequest ( System.Web.Mvc.AuthorizationContext filterContext ) : void

Handles unsecured HTTP requests that are sent to the action method.

Method Details

HandleNonHttpsRequest() protected méthode

Handles unsecured HTTP requests that are sent to the action method.
The HTTP request contains an invalid transfer method override. /// All GET requests are considered invalid. A HTTP 405 Method Not Allowed is thrown.
protected HandleNonHttpsRequest ( System.Web.Mvc.AuthorizationContext filterContext ) : void
filterContext System.Web.Mvc.AuthorizationContext An object that encapsulates information that is required in order to use the /// attribute.
Résultat void

OnAuthorization() public méthode

Determines whether a request is secured (HTTPS) and, if it is not, calls the HandleNonHttpsRequest method.
The parameter is null.
public OnAuthorization ( System.Web.Mvc.AuthorizationContext filterContext ) : void
filterContext System.Web.Mvc.AuthorizationContext An object that encapsulates information that is required in order to use the /// attribute.
Résultat void

RedirectToHttpsAttribute() public méthode

Initializes a new instance of the RedirectToHttpsAttribute class.
public RedirectToHttpsAttribute ( bool permanent ) : System
permanent bool if set to true the redirection should be permanent; otherwise, /// false.
Résultat System