-
Notifications
You must be signed in to change notification settings - Fork 7
05 Authentication with JWT middleware
Timotheus Pokorra edited this page Jan 29, 2018
·
1 revision
See the documentation of Slim JWT Auth:
Here is the commit, that shows what things needed to be implemented for us:
- https://github.com/ICCM-EU/BOF/commit/02290f86f22929c2d14bf5b7ff7d333c473ce2e5
- Since then, some of the code has been moved to its own class, see https://github.com/ICCM-EU/BOF/blob/master/src/classes/Auth.php
Limit access to Admin only:
- We already add a payload: is_admin (see https://github.com/ICCM-EU/BOF/blob/master/src/classes/Auth.php#L37)
- This is checked in the definition of the route:
- https://github.com/ICCM-EU/BOF/blob/master/src/routes/admin.php