Method | Description | |
---|---|---|
AuthenticateUser ( string username, string password, bool rememberMe ) : bool | ||
CurrentUserRights ( ) : IEnumerable |
Returns an IEnumerable of Rights that belong to the ecurrent user.
|
|
DemandUserHasRight ( AuthorizationCheck authCheck, bool redirectIfUnauthorized ) : void |
If the current user does not have the requested rights, either redirects to the login page, or throws a SecurityException.
|
|
DemandUserHasRight ( Rights right, bool redirectToLoginPage ) : void |
If the current user does not have the requested right, either redirects to the login page, or throws a SecurityException.
|
|
Dispose ( ) : void |
Disposes of the resources (other than memory) used by the module that implements T:System.Web.IHttpModule.
|
|
GetCurrentUserRoles ( ) : string[] |
Helper method that returns the correct roles based on authentication.
|
|
ImpersonateUser ( string username, string password ) : bool |
Impersonates a user for the duration of the HTTP request.
|
|
Init ( System.Web.HttpApplication context ) : void |
Initializes a module and prepares it to handle requests.
|
|
IsAuthorizedTo ( AuthorizationCheck authCheck ) : bool |
Returns whether the current user passes authorization on the rights based on the given AuthorizationCheck.
|
|
IsAuthorizedTo ( AuthorizationCheck authCheck, IEnumerable |
Returns whether the current user passes authorization on the rights based on the given AuthorizationCheck.
|
|
IsAuthorizedTo ( Rights right ) : bool |
Returns whether or not the current user has the passed in Right.
|
|
IsSystemRole ( string roleName ) : bool |
Returns whether a role is a System role.
|
|
RedirectForUnauthorizedRequest ( ) : void | ||
SignOut ( ) : void |
Method | Description | |
---|---|---|
ContextAuthenticateRequest ( object sender, |
Handles the AuthenticateRequest event of the context control.
|
|
Security ( ) : System |
public static AuthenticateUser ( string username, string password, bool rememberMe ) : bool | ||
username | string | |
password | string | |
rememberMe | bool | |
return | bool |
public static CurrentUserRights ( ) : IEnumerable |
||
return | IEnumerable |
public static DemandUserHasRight ( AuthorizationCheck authCheck, bool redirectIfUnauthorized ) : void | ||
authCheck | AuthorizationCheck | |
redirectIfUnauthorized | bool | /// If true and user does not have rights, redirects to the login page or homepage. /// If false and user does not have rights, throws a security exception. /// |
return | void |
public static DemandUserHasRight ( Rights right, bool redirectToLoginPage ) : void | ||
right | Rights | |
redirectToLoginPage | bool | /// If true and user does not have rights, redirects to the login page. /// If false and user does not have rights, throws a security exception. /// |
return | void |
public static GetCurrentUserRoles ( ) : string[] | ||
return | string[] |
public static ImpersonateUser ( string username, string password ) : bool | ||
username | string | The username |
password | string | The password |
return | bool |
public Init ( System.Web.HttpApplication context ) : void | ||
context | System.Web.HttpApplication | An |
return | void |
public static IsAuthorizedTo ( AuthorizationCheck authCheck ) : bool | ||
authCheck | AuthorizationCheck | |
return | bool |
public static IsAuthorizedTo ( AuthorizationCheck authCheck, IEnumerable |
||
authCheck | AuthorizationCheck | |
rights | IEnumerable |
|
return | bool |
public static IsAuthorizedTo ( Rights right ) : bool | ||
right | Rights | |
return | bool |
public static IsSystemRole ( string roleName ) : bool | ||
roleName | string | The name of the role. |
return | bool |
public static RedirectForUnauthorizedRequest ( ) : void | ||
return | void |