fadilxcoder / ci-jwt

JWT Authentication - CI3 - REST API - Mobile [https://github.com/fadilxcoder/jwt-mobile-app.git] - Desktop [https://github.com/fadilxcoder/php-desktop-app.git]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JWT Authentication - CodeIgniter 3 REST API

# Static app endpoints
$route['index'] = 'welcome/index';
$route['get-token'] = 'welcome/generateToken';
$route['verify-token'] = 'welcome/verifyToken';

# Desktop app endpoint
$route['api/index'] = 'api/index';
$route['api/request-jwt'] = 'api/requestJwt';
$route['api/send-jwt-for-verification'] = 'api/decodeJwt';
$route['api/api-bearer-verification'] = 'api/apiQueryVerifier';
$route['api/users-listings'] = 'api/usersLising';

Public & Private Keys


JWT with Mobile App

  • Send Public Key to server to check if CLIENT is VALID : <url-for-project-files>/index
  • Return Response if CLIENT is ALLOW or not.
  • If CLIENT is ALLOW, send data to server to create JWT token : <url-for-project-files>/get-token
  • If CLIENT is ALLOW, send JWT token to server to verify and decode JWT token : <url-for-project-files>/verify-token

Heroku Deploy

  • Change CI composer - vendor (vendor/autoload.php) location

Notes

About

JWT Authentication - CI3 - REST API - Mobile [https://github.com/fadilxcoder/jwt-mobile-app.git] - Desktop [https://github.com/fadilxcoder/php-desktop-app.git]


Languages

Language:PHP 99.7%Language:HTML 0.3%