flexisip-account-manager/flexiapi
Timothée Jaussoin f3ba51682f Complete email + SMS authentication
Also send an email when the email was changed
2020-09-14 11:24:59 +02:00
..
app Complete email + SMS authentication 2020-09-14 11:24:59 +02:00
bootstrap Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
config Complete email + SMS authentication 2020-09-14 11:24:59 +02:00
database Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
public Integrate FlexiAPI in the RPM package (logs, conf, env…) 2020-02-10 10:52:28 +01:00
resources Complete email + SMS authentication 2020-09-14 11:24:59 +02:00
routes Add account delete 2020-09-14 11:24:59 +02:00
storage Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
tests Integrate FlexiAPI in the RPM package (logs, conf, env…) 2020-02-10 10:52:28 +01:00
.editorconfig Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
.env.example Complete email + SMS authentication 2020-09-14 11:24:59 +02:00
.gitattributes Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
.gitignore Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
.styleci.yml Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
artisan Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
composer.json Complete email + SMS authentication 2020-09-14 11:24:59 +02:00
composer.lock Complete email + SMS authentication 2020-09-14 11:24:59 +02:00
package.json Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
phpunit.xml Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
README.md Integrate FlexiAPI in the RPM package (logs, conf, env…) 2020-02-10 10:52:28 +01:00
server.php Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00
webpack.mix.js Import a new API, build with Laravel 2020-02-03 15:20:48 +01:00

FlexiAPI

This tool connects to the Flexisip CLI interface and exposes several endpoints to request and manage it.

Setup

Clone the repository, install the dependencies and generate a key.

composer install --no-dev
php artisan key:generate

Then configure the two databases connections in the .env file (from the .env.example one). And migrate the tables.

php artisan migrate

The local one (that is by default using SQLite) is used to store authentications sessions. The remote one should be configured to connect directly to the Flexisip database.

You can also run the test suit using phpunit.

To know more about the web server configuration part, you can directly visit the official Laravel installation documentation.

CRON job

The DIGEST authentication method is saving some temporary information (nonces) in the database.

To expire and/or clear old nonces a specific command should be called periodically.

php artisan digest:expired-nonces-clear <minutes>

Usage

The root page contains all the required documentation to authenticate and request the API.