https://github.com/aswassaw/ci4-auth-jwt
Aplikasi Restful dengan CodeIgniter 4. Studi kasus Authentication dan Authorization dengan JWT.
https://github.com/aswassaw/ci4-auth-jwt
authentication authorization codeigniter4 jsonwebtoken restful-api
Last synced: about 2 months ago
JSON representation
Aplikasi Restful dengan CodeIgniter 4. Studi kasus Authentication dan Authorization dengan JWT.
- Host: GitHub
- URL: https://github.com/aswassaw/ci4-auth-jwt
- Owner: Aswassaw
- License: mit
- Created: 2021-08-19T12:43:52.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-19T12:59:33.000Z (almost 5 years ago)
- Last Synced: 2025-05-16T15:09:41.591Z (about 1 year ago)
- Topics: authentication, authorization, codeigniter4, jsonwebtoken, restful-api
- Language: PHP
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CI4 Auth JWT
Aplikasi Restful dengan CodeIgniter 4. Studi kasus Authentication dan Authorization dengan JWT.
## Cara instalasi:
- Clone repo ini.
- Jalankan `composer install`.
- Konfigurasi env lalu jalankan `php spark migrate`.
- Jalankan `php spark serve`, server akan berjalan di `http://localhost:8080`.
## Endpoint yang tersedia:
- Register
- Endpoint: http://localhost:8080/register
- Body: email (required, string), password (required, string), password_confirm (required, string).
- Desc: Endpoint untuk melakukan register.
- Login
- Endpoint: http://localhost:8080/login
- Body: email (required, string), password (required, string).
- Desc: Endpoint untuk melakukan login. Pada langkah ini akan mendapatkan JWT token.
- Me
- Endpoint: http://localhost:8080/me
- Header: Authorization (JWT token yang didapatkan dari login).
- Desc: Endpoint untuk mendapatkan data user.
Hasil belajar dari tutorial: https://youtu.be/lPHp2cbO6d0