Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/troygoode/node-muut
Node.js module for generating private signatures for the muut forum/comment system.
https://github.com/troygoode/node-muut
Last synced: about 6 hours ago
JSON representation
Node.js module for generating private signatures for the muut forum/comment system.
- Host: GitHub
- URL: https://github.com/troygoode/node-muut
- Owner: troygoode
- License: mit
- Created: 2014-05-02T05:27:30.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-02T05:27:58.000Z (over 10 years ago)
- Last Synced: 2024-10-16T09:31:49.731Z (about 1 month ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `muut`
This npm module allows users of the [muut Developer Edition](https://muut.com/docs/developer.html) product to generate signed URLs for private forums/comments and Single Sign On.
**[Follow me (@troygoode) on Twitter!](https://twitter.com/intent/user?screen_name=troygoode)**
[![NPM](https://nodei.co/npm/muut.png?downloads=true&stars=true)](https://nodei.co/npm/muut/)
[![build status](https://secure.travis-ci.org/troygoode/node-muut.png)](http://travis-ci.org/troygoode/node-muut)
* [Installation](#installation)
* [Usage](#usage)
* [License](#license)
* [Author](#author)## Installation (via [npm](https://npmjs.org/package/muut))
```bash
$ npm install muut
```## Usage
Generate your ticket server-side:
```javascript
var muut = require('muut'),
secret = 'MY_SECRET',
user = {
id: 'johndoe', // required
displayname: 'John Doe', // required
email: '[email protected]',
avatar: '//gravatar.com/avatar/e5fb96fe7ec4ac3d4fa675422f8d1fb9',
is_admin: true
};var muut_ticket = muut(secret, user);
```*(See [the muut documentation](https://muut.com/docs/developer.html) for more information about the user object being passed in.)*
Now pass that ticket to your templating engine and on into muut's client-side library:
```html
$("#muut").muut({
api: {
key: 'testapikey',
signature: '<%= muut_ticket.signature %>',
message: '<%= muut_ticket.message %>',
timestamp: <%= muut_ticket.timestamp %>
}
})```
## License
[MIT License](http://www.opensource.org/licenses/mit-license.php)
## Author
[Troy Goode](https://github.com/TroyGoode) ([[email protected]](mailto:[email protected]))