npm.io
1.1.3 • Published 11 years ago

s5

Licence
BSD-2-Clause
Version
1.1.3
Deps
1
Vulns
0
Weekly
0
Stars
1

s5.js

s5 is the StudentRND Service Single Sign-On System. Here's the node module to interact with it.

Installation

npm install s5

Examples

var s5 = require('s5');

// Create an s5 instance with your API credentials
var sso = new s5("YOUR_API_KEY", "YOUR_API_SECRET");

// Get the OAuth URI with extended privileges
sso.getOAuthURI("http://example.com/oauth/s5", "extended");

// Exchange the provided code for an access token
sso.exchangeCode(code, callback);

// Get a user
sso.getUser("tjhorner", callback);

// Get user from access token
sso.me(accessToken, callback);

Keywords