NAME
App::CamelPKI::Controller::Test - Catalyst learning tests.
SYNOPSIS
DESCRIPTION
App-PKI controller that serves the URIs starting with /test
. Those tests are eXtreme-Programming style ``learning tests'', that is, tiny pieces of controllers and views to play with Catalyst to learn how it works.
Contrary to all other kind of tests, learning tests are neither normative (success is not required) nor automated (success criteria may are not be implemented, or even formulated).
json_helloworld
Accepts a JSON parameter which contains an associative table with keys "nom" (meaning last name in French) and "prenom" (first name), and returns a JSON parameter which contain an associative table with a welcome message for the salutation
key. (For the fame of it, "Bonjour" means "Hello" in French.)
ca_permission_level
Returns ref($c->model("CA")), which is an indicator of the privilege level that the HTTP/S client is wielding (deduced from its client certificate in App::CamelPKI). A JSON request is not needed, allowing the use of curl
in command-line mode for testing purposes.
throw_exception
As the name implies, throws a structured exception.