muut

v0.0.1
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.
moot muut forum forums signing signature

muut

This npm module allows users of the muut Developer Edition product to generate signed URLs for private forums/comments and Single Sign On.

Follow me (@troygoode) on Twitter!

NPM

build status

Installation (via npm)

$ npm install muut

Usage

Generate your ticket server-side:

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 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:

<script>
$("#muut").muut({
   api: {
      key: 'testapikey',
      signature: '<%= muut_ticket.signature %>',
      message: '<%= muut_ticket.message %>',
      timestamp: <%= muut_ticket.timestamp %>
   }
})
</script>

License

MIT License

Author

Troy Goode ([email protected])

npm i muut

Metadata

  • Unknown
  • >=0.10.0
  • Troy Goode
  • released 5/2/2014

Downloads

Maintainers