Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bimedia-fr/bimedia-rest-security
implementation de la sécurité pour les services rest Bimedia
https://github.com/bimedia-fr/bimedia-rest-security
Last synced: 8 days ago
JSON representation
implementation de la sécurité pour les services rest Bimedia
- Host: GitHub
- URL: https://github.com/bimedia-fr/bimedia-rest-security
- Owner: bimedia-fr
- License: apache-2.0
- Created: 2014-07-01T13:44:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-03-17T18:50:08.000Z (almost 2 years ago)
- Last Synced: 2024-04-25T18:43:31.490Z (8 months ago)
- Language: JavaScript
- Size: 69.3 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bimedia-rest-security
=====================Provide client authentication to an architect application using a `rest` plugin
### Installation
```sh
npm install --save https://github.com/bimedia-fr/bimedia-rest-security.git
```### Usage
Boot [Architect](https://github.com/c9/architect) :
```js
var path = require('path');
var architect = require("architect");var config = architect.loadConfig(path.join(__dirname, "config.js"));
architect.createApp(config, function (err, app) {
if (err) {
throw err;
}
console.log("app ready");
});
```Configure rest-security with Architect `config.js` :
```js
module.exports = [{
packagePath: 'bimedia-rest-security',
keypath: 'http://localhost:8086/api/key/%s', /* Private key server , %s will be replaced with principal */
timestampValidity: 15*60, /* Timestamp validity, in seconds, default 60 */
scheme: 'BWS', /* Authorization scheme, default BWS */
name: 'auth', /* Logger name, default auth */
httpHeaderPrefix: 'x-bm' /* http prefix name, default x-bm */
}];
```