Add history page to show user session history

e_collectivites-version
Romain_L 2 years ago
parent 2b5e1485f5
commit 95522d0f11
  1. 10
      api_lemon_pleiade/api_lemon_pleiade.routing.yml
  2. 12
      api_lemon_pleiade/src/Controller/PleiadeAjaxController.php

@ -22,4 +22,12 @@ api_lemon_pleiade.lemon_session_query:
_title: 'LemonLDAP API Session Query'
_format: json
requirements:
_access: 'TRUE'
_access: 'TRUE'
api_lemon_pleiade.my_history:
path: '/history'
defaults:
_controller: '\Drupal\api_lemon_pleiade\Controller\PleiadeAjaxController::myHistory'
_title: 'Historique de connexion'
requirements:
_permission: 'access content'

@ -35,5 +35,17 @@ class PleiadeAjaxController extends ControllerBase {
}
// TODO : TOTP query if possible
/**
* Returns our session history page.
*
* @return array
* A simple renderable array.
*/
public function myHistory() {
return [
'#markup' => '<div id="history>Historique à remplir via Ajax dans div#history</div>',
];
}
}
Loading…
Cancel
Save