Download the PHP package infinitum/php-sdk without Composer

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

Infinitum SDK for PHP

Installation

The Infinitum SDK can be installed via Composer.

Usage


API Initialization

To use the Inifnitum you need to provide the API Token, the registered and licensed device identity and the corresponding workspace.

Setting the Access Token

To use the modules, you first must call the init() method or set the access token via setAccessToken() if you already have an access token persisted/stored.

Example:

Modules

To user modules, you must first fetch the module accessing the \Fyi\Infinitum\Infinitum object

and then the methods are accessible (methods listed further on).

All API methods snippets show an example data object and the expected response structure.

There are 2 exceptions to be caught: \Fyi\Infinitum\Exceptions\InfinitumSDKException and \Fyi\Infinitum\Exceptions\InfinitumAPIException both explained [here]().

User

The User API object can be retrieved by calling it from the \Fyi\Infinitum\Infinitum object

Register new User

The required parameters for registering a new user rely on the chosen Infinitum API configuration, like so, all SDK parameters are considered optional.

Response:

There are also optional arrays (json string encoded) related to additional user information. Refer the [Infinitum API docs]() for more information.

Get User by Face

Fetch a user by providing a picture of the User's face.

Response:

Get User by Email address

Fetch a user by providing its email address.

Response:

Get all Users

Fetch a user by providing its email address.

Response:

Delete User

Delete a user by providing its unique ID.

Response:

Notify a User

Send a notification to a User.

The notification action is required due to being its primary identifier. Refer to the API docs for more information.

Device

The Device API object can be retrieved by calling it from the \Fyi\Infinitum\Infinitum object

Register new Device

Register a new device in the Infinitum API.

There are also optional arrays (json string encoded) related to additional user information. Refer the Infinitum API docs for more information.

Register new Device User

Register a new association between a Device and a User.

The data provided can either contain the device_mac_address or device_id along with the user_email or user_id, in order to search for a device/user with those properties or directly reference their unique IDs.

Response:

License a Device

Update a device to either be licensed or revoke license to control access to the Infinitum API.

Response:

Validate a Device

Validate whether or not a device is able/licensed to access the Infinitum API, and retrieve its information.

Response:

Delete Device

Delete a device by providing its unique ID.

Response:

Auth

The Auth API object can be retrieved by calling it from the \Fyi\Infinitum\Infinitum object

All Auth API requests have the same response:

Biometric Auth

Authenticate a user against the Infinitum API using its face properties. Along with the user photo, additional parameters can be provided to specify the device and method used in the request.

Login

Authenticate a user against the Infinitum API using regular login parameters: email and password.

Code

Authenticate a user against the Infinitum API using a unique code from to the user's possible codes.

CMS

The CMS API object can be retrieved by calling it from the \Fyi\Infinitum\Infinitum object

Exceptions

Both exceptions extend the base PHP Exception class so all related methods are available.

InfinitumAPIException

This exception is thrown when an API error occurrs either due to malformed requests, server errors or any other error related to the Infinitum API. In addtition to the methods provided by the Exception class, a getBody() method is also available, to fetch the response body sent by the Infinitum API containing the error information (message, type and status code).`

Error body structure:

Usage example:

InfinitumSDKException

The SDK exception is thrown in case of any error during the execution of any SDK method, unrelated to the API calls. This exception is mostly used when parameters are missing before executing a request that requires any of those parameters. Example:

and can be caught as any exception:

The return value would be Missing Email parameter..

MissingTokenException

This exception has InfinitumSDKException as a parent, but it is only used when the access token is missing, meaning that an init() or setAccessToken() call was never done. It can be caught either by expecting the MissingTokenException class itself or its parent InfinitumSDKException.


All versions of php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
guzzlehttp/guzzle Version ^6.3
phpunit/phpunit Version 5.7.*
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 infinitum/php-sdk contains the following files

Loading the files please wait ....