Download the PHP package libaro/miqey-client without Composer

On this page you can find all versions of the php package libaro/miqey-client. 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 miqey-client

MiQey Client

Latest Version on Packagist Total Downloads

The MiQey Client Laravel Package simplifies the integration of the MiQey functionality into your Laravel projects. MiQey is designed to facilitate a secure login procedure by generating sign requests, managing user responses through QR codes or SMS, and seamlessly logging users into your projects.

Installation

You can install the package via composer:

Publish the config file:

Usage

The miQey-client package takes care of sending communicating with the miQey-service to handle user authentication. The first thing you should do is add this code to your login page:

` The miQey-client will emit a socket event when a 'User Authenticated'-webhook callback is made to your application, which will be picked up by the listener in this script. Upon receiving the socket event, your login page will invoke the ValidationController of the miQey-client, which will log in your user based on their phone number. The phone number is received from the server cache using the token passed in the socket event.

With this single code insert, you can harness the full power of miQey!

Generated Files

Underneath, you will find a breakdown of the vendor files generated by the package and their role in the miQey integration into your project.

config/miqey.php

Installing miQey-client generates a config file to store the credentials and endpoints needed to communicate with the miQey authentication service. It contains the following keys that should point to the correct values in your environment-file:

``

routes/routes.php

miQey adds two new routes to your project so that the backend-service can reach your application:

src/Events/SignSmsRequestReceived

The SignSmsRequestReceived is the socket event that is emitted when the miQey client receives the 'User Authenticated'-callback from the miQey-backend service. It passes a token, which can be used to retrieve the user's phone number from the cache in your backend.

``

src/Handlers/WebhookHandler.php

The WebhookHandler is invoked when a 'User Authenticated'-callback is sent to the webhook_endpoint of your application. Firstly, it validates the webhook's authenticity by decrypting the signature in the header using the webhook secret in the miQey-config file. When the origin is verified, it takes the user's phone number and the sign code from the callback body. The phone_number is put in cache as to not expose it to the frontend of your application. A new token is made as a cache-key. This token, together with the sign code, is passed with the socket event described just above this paragraph, which is fired at that point to let your loginpage know to redirect.

``

src/Http/Controllers/ValidationController.php

The ValidationController is the last stop in the miQey-authentication process. When this controller is invoked it gets the phone number of the user that was authenticated from the server cache. It then resolves your user model using the path in your miQey config file, and queries that model to get the user by phone_number. Lastly, it log the user into your app, and redirect to your authenticated root url.

``

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.


All versions of miqey-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1|^8.2|^8.3
ext-json Version *
jenssegers/agent Version ^2.6
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 libaro/miqey-client contains the following files

Loading the files please wait ....