AuthenticationService v0.3.0+7-g8a7f190
Public Member Functions | List of all members
Joutsen.AuthenticationService.v2.ApplicationController Class Reference

A controller that manages application master data. More...

Public Member Functions

 ApplicationController (ApplicationRepository repository)
 Creates a new instance of the controller. More...
 
ActionResult Add ([Required] ApplicationName requestBody)
 Adds a new application whose authentication is managed by the service. More...
 
ActionResult Delete ([Required] Application requestBody)
 Removes an existing application from the service. More...
 
JsonResult List ([Range(0, int.MaxValue)] int pageNumber=0, [Range(1, int.MaxValue)]int numberOfResults=int.MaxValue)
 Fetches the available applications organized in pages. More...
 

Detailed Description

A controller that manages application master data.

Remarks
Access to this controller is restricted to the administrator of the AuthenticationService.
Since
0.2.0

Constructor & Destructor Documentation

◆ ApplicationController()

Joutsen.AuthenticationService.v2.ApplicationController.ApplicationController ( ApplicationRepository  repository)

Creates a new instance of the controller.

Member Function Documentation

◆ Add()

ActionResult Joutsen.AuthenticationService.v2.ApplicationController.Add ( [Required] ApplicationName  requestBody)

Adds a new application whose authentication is managed by the service.

Parameters
requestBodythe model for the request body containing the name of the new application
Returns
HTTP 409 Conflict if an application with the name already exists, otherwise a JsonResult containing the name and the hash of the new application

◆ Delete()

ActionResult Joutsen.AuthenticationService.v2.ApplicationController.Delete ( [Required] Application  requestBody)

Removes an existing application from the service.

Parameters
requestBodythe model for the request body containing the name or key identifying the application
Returns
HTTP 404 Not Found if the application cannot be identified by the name or hash key, otherwise HTTP 200 OK if the application was deleted

◆ List()

JsonResult Joutsen.AuthenticationService.v2.ApplicationController.List ( [Range(0,int.MaxValue)] int  pageNumber = 0,
[Range(1, int.MaxValue)] int  numberOfResults = int.MaxValue 
)

Fetches the available applications organized in pages.

Parameters
pageNumberthe zero based page number to fetch
numberOfResultsthe maximum number of results to fetch
Returns
a list of applications with key and name as json