- Notifications
You must be signed in to change notification settings - Fork8
CakePHP JWT authentication demo using Authentication plugin
License
ishanvyas22/cakephp-jwt-authentication-demo
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This project is proof of concept on implementation of JWT authentication in CakePHP usingAuthentication plugin.
Download the repo locally:
git clone git@github.com:ishanvyas22/cakephp-jwt-authentication-demo.gitcd cakephp-jwt-authentication-demoInstall PHP dependencies:
composer install
Read and edit the environment specific
config/app_local.phpand setup the'Datasources'and any other configuration relevant for your application. Other environment agnostic settings can be changed inconfig/app.php.Run database migrations & seeders:
bin/cake migrations migratebin/cake migrations seed --seed=DatabaseSeed
Run the dev server (the output will give the address):
bin/cake server
That's all!
You can send aPOST request to/api/users/login.json URL with below details:
- Username: john
- Password: secret
It will return JWT token in json response.
To get authenticated user's information you have to make aGET request to/api/users.json URL with the token you got from previous step in theAuthorization header withBearer prefix.
Do you like this project? Support it by donating:


The MIT License (MIT). Please seeLicense File for more information.
About
CakePHP JWT authentication demo using Authentication plugin
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.