|
AuthenticationService
v0.2.0
|
Controller extension methods that handle different authorization cases. More...
Static Public Member Functions | |
| static void | CheckIfAdmin (this ApiController controller) |
| Checks if the current user is service administrator. More... | |
| static void | CheckIfAuthorized (this ApiController controller, Authentication.Application app, UserRepository repository, params string[] rolesToAuthorize) |
| Checks if the current user is a service administrator or is granted access rights through different other roles. More... | |
| static void | CheckIfAuthorized (this ApiController controller, Authentication.User user, Authentication.Application app, UserRepository repository, params string[] rolesToAuthorize) |
| Checks if the current user is a service administrator, is accesing its own records or is granted access rights through different other roles. More... | |
| static void | CheckIfAuthorized (this ApiController controller, String username) |
| Checks if the current user is a service administrator or is accesing its own records roles. More... | |
Controller extension methods that handle different authorization cases.
|
static |
Checks if the current user is service administrator.
| AuthorizationException | if the current user is not a service administrator. |
|
static |
Checks if the current user is a service administrator or is granted access rights through different other roles.
| controller | the controller |
| app | the application that identifies the users roles |
| repositry | the repository provides additional user data |
| rolesToAuthorize | the list of roles that authorize the user |
| AuthorizationException | if the user is not authorized through one of the roles or the service admin status |
|
static |
Checks if the current user is a service administrator, is accesing its own records or is granted access rights through different other roles.
| controller | the controller |
| user | the user data to be changed |
| app | the application that identifies the users roles |
| repositry | the repository provides additional user data |
| rolesToAuthorize | the list of roles that authorize the user |
| AuthorizationException | if the user is not authorized through one of the roles its username or the service admin status |
|
static |
Checks if the current user is a service administrator or is accesing its own records roles.
| controller | the controller |
| username | the name of the user whose records are accessed |
| AuthorizationException | if the user is not authorized through username or the service admin status |
1.8.13