|
AuthenticationService v0.3.0+7-g8a7f190
|
A controller that manages user roles for applications managed by the service. More...
Public Member Functions | |
| RoleController (RoleRepository repository, UserRepository userRepository, ApplicationRepository applicationRepository) | |
| Creates a new instance of the controller. More... | |
| ActionResult | Add ([Required] Role requestBody) |
| Adds a role to a user for a specific application. More... | |
| ActionResult | Delete ([Required] RoleIdentifier requestBody) |
| Removes a role for a specific application from a user. More... | |
| ActionResult | List ([Required] String username, String applicationName=null, String applicationKey=null, int pageNumber=0, int numberOfResults=int.MaxValue) |
| Fetches all roles of a user for a specific application. More... | |
A controller that manages user roles for applications managed by the service.
| Joutsen.AuthenticationService.v2.RoleController.RoleController | ( | RoleRepository | repository, |
| UserRepository | userRepository, | ||
| ApplicationRepository | applicationRepository | ||
| ) |
Creates a new instance of the controller.
| ActionResult Joutsen.AuthenticationService.v2.RoleController.Add | ( | [Required] Role | requestBody | ) |
Adds a role to a user for a specific application.
| requestBody | the model for the request body containing the name, user and application of the new role |
| description | an optional description of the role. If the description is omitted and a role with the same name already exists for the application the description is copied to the new role |
| ActionResult Joutsen.AuthenticationService.v2.RoleController.Delete | ( | [Required] RoleIdentifier | requestBody | ) |
Removes a role for a specific application from a user.
| requestBody | the model for the request body containing the identifiers of the role |
| ActionResult Joutsen.AuthenticationService.v2.RoleController.List | ( | [Required] String | username, |
| String | applicationName = null, |
||
| String | applicationKey = null, |
||
| int | pageNumber = 0, |
||
| int | numberOfResults = int.MaxValue |
||
| ) |
Fetches all roles of a user for a specific application.
| username | the name of the user |
| applicationName | the name of the application if it is identified by its name |
| applicationKey | the hash key of the application if it is identified by its key |
| pageNumber | the zero based page number to fetch |
| numberOfResults | the maximum number of results to fetch |