{"id":19218784,"url":"https://github.com/fadilxcoder/ci-jwt","last_synced_at":"2026-02-26T21:36:26.392Z","repository":{"id":86245112,"uuid":"282034725","full_name":"fadilxcoder/ci-jwt","owner":"fadilxcoder","description":"JWT Authentication - CI3 - REST API - Mobile [https://github.com/fadilxcoder/jwt-mobile-app.git] - Desktop [https://github.com/fadilxcoder/php-desktop-app.git]","archived":false,"fork":false,"pushed_at":"2022-10-18T18:10:02.000Z","size":573,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T20:35:44.929Z","etag":null,"topics":["ci3","notes","php","poc","rest-api","server"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fadilxcoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-23T19:10:05.000Z","updated_at":"2024-03-04T23:03:25.000Z","dependencies_parsed_at":"2023-03-10T22:30:20.166Z","dependency_job_id":null,"html_url":"https://github.com/fadilxcoder/ci-jwt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fci-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fci-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fci-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fci-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fadilxcoder","download_url":"https://codeload.github.com/fadilxcoder/ci-jwt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253844180,"owners_count":21973013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci3","notes","php","poc","rest-api","server"],"created_at":"2024-11-09T14:28:04.836Z","updated_at":"2026-02-26T21:36:21.362Z","avatar_url":"https://github.com/fadilxcoder.png","language":"PHP","readme":"# JWT Authentication - CodeIgniter 3 REST API\n\n```php\n\n# Static app endpoints\n$route['index'] = 'welcome/index';\n$route['get-token'] = 'welcome/generateToken';\n$route['verify-token'] = 'welcome/verifyToken';\n\n# Desktop app endpoint\n$route['api/index'] = 'api/index';\n$route['api/request-jwt'] = 'api/requestJwt';\n$route['api/send-jwt-for-verification'] = 'api/decodeJwt';\n$route['api/api-bearer-verification'] = 'api/apiQueryVerifier';\n$route['api/users-listings'] = 'api/usersLising';\n\n```\n\n- *Resource* : Tutorials (http://developer-city.com/jwt)\n- *Resource* : Verify Signature (https://jwt.io/)\n- *Resource* : PHP Package PHP-JWT (https://firebaseopensource.com/projects/firebase/php-jwt/)\n\n-------\n\n# Public \u0026 Private Keys\n\n- *Resource* : Tutorials (https://morioh.com/p/1e376919d0af)\n- Generate a pair of keys here : http://travistidwell.com/jsencrypt/demo/ - **GUI Version**\n- *Resource* : Console Key Generator (http://travistidwell.com/jsencrypt/)\n- cmd : `openssl genrsa -out private.pem 1024` where *private.pem* is the private key file name\n- cmd : `openssl rsa -pubout -in private.pem -out public.pem` get public key from private key\n- *Files* : `keys/private.pem` \u0026 `keys/private.pem`\n\n-------\n\n# JWT with Mobile App\n\n- Send Public Key to server to check if CLIENT is VALID : `\u003curl-for-project-files\u003e/index`\n- Return Response if CLIENT is ALLOW or not.\n- If CLIENT is ALLOW, send data to server to create JWT token : `\u003curl-for-project-files\u003e/get-token`\n- If CLIENT is ALLOW, send JWT token to server to verify and decode JWT token : `\u003curl-for-project-files\u003e/verify-token`\n\n# Heroku Deploy\n\n- Change CI *composer - vendor* (`vendor/autoload.php`) location\n\n# Notes\n\n- Download `cacert.pem` from https://curl.haxx.se/ca/cacert.pem\n- `curl.cainfo=\"C:\\wamp64\\cert\\cacert.pem\"` in php.ini","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadilxcoder%2Fci-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffadilxcoder%2Fci-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadilxcoder%2Fci-jwt/lists"}