Giter Site home page Giter Site logo

faya's Introduction

Faya

Faya provides a simple way to create and manage tokens through its web interface or its API.

Usage

You can create tokens with various properties :

  • Active (true/false)

  • From (date)

  • To (date)

  • Pool (number)

The Active property prevails over the others. All properties can be set at the same time, for instance, if you set To property to 2017-01-01 00:00 and Pool property to 25 000 then the token can be used 25 000 times until 2017-01-01 00:00. Once the date is reached, the token cannot be used again, even if the Pool is not empty yet. Correspondingly, if the token is used 25 000 times before the date then it cannot be used again even though the date hasn’t been reached yet.

Tokens are stored in namespaces in order to use them for totally unrelated subjects. Consequently, a token is valid (or not) against a specific namespace.

Configuration

Some environment variables are available to configure Faya :

Table 1. Environment variables
Name Default Description

MONGO_URL

null

Full URL of the MongoDB instance used for production

MONGO_TEST_URL

mongodb://localhost/faya_test

Full URL of the MongoDB instance used for tests

JWT_SECRET

changethis

Secret used to sign JWT

HTTPS_ENABLED

null

Set to true if Faya is behind a reverse proxy providing HTTPS

LOG_LEVEL

info

Pick from [error, warn, info, verbose, debug, silly]

MAIL_HOST

null

SMTP host

MAIL_PORT

null

SMTP port

MAIL_TLS

null

SMTP TLS

MAIL_USERNAME

null

SMPT username

MAIL_PASSWORD

null

SMTP password

MAIL_FROM

null

Email address used to send mail

Run

You can either install node and NPM to run Faya or simply build the Docker image :

docker build -t faya .
docker run -e MONGO_URL=... faya
Important
This repository only contains the Faya server. In order to deploy/run a full instance, see deploy-exemple directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.