Download the PHP package inisiatif/user without Composer

On this page you can find all versions of the php package inisiatif/user. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package user

User Packages

Package inisiatif/user digunakan di lingkungan Inisiatif Zakat Indonesia untuk proses auth pada aplikasi yang di buat.

Dokumentasi ini di peruntukan untuk v2

v2 di buat ulang dari v1 dan tidak ada jalan migrasi dari v1 ke v2 harus rewrite

Version map

Version PHP Laravel
2.x 8.1, 8.2 9, 10
3.x 8.2, 8.3 9, 10, 11

Install

Untuk menginstall paket ini bisa menggunakan composer dengan menjalankan perintah berikut di terminal :

Anda bisa juga mempublish dan menjalankan migrasi dengan perintah

Anda juga bisa mempublish file config dengan perintah

Berikut ini adalah isi dari file config

Penggunaan

Ubah user model auth

Ubah config di auth.providers.users.model menjadi Inisiatif\Package\User\Models\User::class

Rest API

Paket ini mengekspose route api yang bisa di gunakan untuk melakukan

  1. Login dan Logout menggunakan token
  2. List dan delete user token
  3. Menampilkan profile user
  4. Update pin user

sebelum menggunakan route api, sebelumnya tambahkan kode berikut pada file route api, biasanya ada di routes/api.php

  1. POST /auth/token : untuk login dan membuat token baru, secara default token di buat dengan expired_at null
  2. DELETE /auth/token : untuk logout / hapus token yang sedang di gunakan
  3. GET /user-token : untuk menampilkan list token untuk user yang sedang login
  4. DELETE /user-token/{tokenId} : untuk mengapus token berdasarkan tokenId
  5. GET /user-information : untuk menampilkan informasi user yang sedang login
  6. PUT /personal-identification-number : untuk mengupdate pin user

Passport

Mulai versi 3.3 ditambahkan fitur untuk auth menggunakan OAuth2 via laravel/passport.

Pertama harus menamhakan configurasi di config/services.php

Kedua tambahkan router baru pada routes/web.php

ini akan menambahkan route baru yaitu /ouath/passport/redirect dan /oauth/passport/callback.

Testing

Fixing code style

Static code analyse


All versions of user with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package inisiatif/user contains the following files

Loading the files please wait ....