0.1.9 • Published 11 years ago

webmaker-loginapi v0.1.9

Weekly downloads
3
License
-
Repository
github
Last release
11 years ago

Webmaker-LoginAPI

Setup

Setup is easy! Add to your package.json and run npm install.

Integration

Pass the module an http address including a user/pass according to the http uri scheme:

http://user:pass@webmakerServer.foo

i.e.

require( "webmaker-loginapi" )( "http://admin:roflcoptor@login.wm.org" )

Usage

The module returns an object with two methods:

loginHandle.getUser ( id, callback )

...which retrieves the user model for the passed id, passing the callback the parameters ( errorString, userObject ) and

loginHandle.isAdmin ( id, callback )

...which retrieves the user permissions for the passed id, passing the callback the parameters ( errorString, [isAdmin] )

See: https://github.com/mozilla/login.webmaker.org/wiki/LoginAPI-&-User-Model

Testing

Ensure the grunt and mocha npm modules are installed globally, then run

  1. grunt
  2. mocha
0.1.9

11 years ago

0.1.8

11 years ago

0.1.7

11 years ago

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.1

11 years ago