Giter VIP home page Giter VIP logo

api-central's Introduction

API Central

Node.js RESTful API that provides management and access to different APIs, handling authentication and permissions.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Documentation
  4. Usage
  5. Roadmap
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgments

About The Project

API Central is a Node.js API that aims to simplify access and authentication management of many APIs.

Here's a blank template to get started: To avoid retyping too much info. Do a search and replace with your text editor for the following: github_username, repo_name, twitter_handle, linkedin_username, email_client, email, project_title, project_description

Built With

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g

Installation

  1. Get a free API Key at https://example.com
  2. Clone the repo
    git clone https://github.com/ThomasLvll/API-Central.git
  3. Install NPM packages
    npm install
  4. Enter your API in config.js
    const API_KEY = 'ENTER YOUR API';

(back to top)

(back to top)

Usage

API Usage Flow

1. Register into API

This step only should be performed once.

You can sign up and subscribe to API through Central web interface.

2. Request an API token

This step should be repeated each time the token expires.

You can do so by making a GET /token HTTP request to API, passing the client ID and secret keys returned in previous step as Authorization HTTP request header.

The header must strictly match the following format:

Authorization: Bearer <authToken>

where authToken is a base64-encoded string in this format:

<clientId>:<clientSecretHash>:<listOfPermissions>

where clientId obviously is your client ID key, and clientSecretHash is a hash of your client secret key. Supported hashing methods are the following:

  • MD5
  • SHA1

listOfPermissions parameter is a comma-separated list of permissions you want your API token to own.

The HTTP request finally looks like:

GET /token
Authorization: Bearer af456zjk54...

In case of success, the JSON response body has the following form:

{
	"apiToken": "kl593fkfd240...",
	"expirationDate": "2022-04-26 17:10:25.230 +00:00",
	"refreshUrl": "https://example.com/token/refresh/kl593fkfd240..."
}

3. Call the API

Once your API token has been obtained, you can make requests to endpoints of the API.

Even if not all paths require an authorization, it is recommended to always include API token in your requests. It must be passed as Authorization HTTP request header, strictly matching the following format:

Authorization: Bearer <authToken>

(back to top)

Roadmap

  • Feature 1
  • Feature 2
  • Feature 3
    • Nested Feature

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GNU GPLv3 License. See COPYING for more information.

(back to top)

Contact

Thomas Léveillé - [email protected]

Project Link: https://github.com/ThomasLvll/API-Central

(back to top)

Acknowledgments

(back to top)

api-central's People

Contributors

thomaslvll avatar

Watchers

 avatar

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.