C# Class vlko.core.Authentication.ConditionalAuthorizeAttribute

Conditional authorize attribute using app setting to get bool value if to ignore (true) authorization for this controller or action or to perform authorization (false or missing value).
Inheritance: System.Web.Mvc.AuthorizeAttribute
Datei anzeigen Open project: vlko/vlko

Public Methods

Method Description
ConditionalAuthorizeAttribute ( string configKeyIgnoreIdent ) : System

Initializes a new instance of the ConditionalAuthorizeAttribute class.

OnAuthorization ( System.Web.Mvc.AuthorizationContext filterContext ) : void

Called when a process requests authorization.

Private Methods

Method Description
GetConfigValueFromCache ( string configKeyIgnoreIdent ) : bool

Gets the config value from cache.

LoadConfigValueFromSettings ( string configKeyIgnoreIdent ) : bool

Loads the config value.

Method Details

ConditionalAuthorizeAttribute() public method

Initializes a new instance of the ConditionalAuthorizeAttribute class.
public ConditionalAuthorizeAttribute ( string configKeyIgnoreIdent ) : System
configKeyIgnoreIdent string The config key ignore ident in application settings .
return System

OnAuthorization() public method

Called when a process requests authorization.
The parameter is null.
public OnAuthorization ( System.Web.Mvc.AuthorizationContext filterContext ) : void
filterContext System.Web.Mvc.AuthorizationContext The filter context, which encapsulates information for using .
return void