Skip to content

Instantly share code, notes, and snippets.

@zuk
Created September 19, 2011 12:36
Show Gist options
  • Save zuk/1226407 to your computer and use it in GitHub Desktop.
Save zuk/1226407 to your computer and use it in GitHub Desktop.
Basic rollcall.js authentication example
rollcall = new Rollcall.Client('http://rollcall.aardvar.encorelab.org')
token = rollcall.getCurrentToken()
if (token) {
rollcall.fetchSessionForToken(WallCology.token, function(data) {
session = data.session
// The session hash has the user's account info in it. At this point
// we can assume the user is authenticated.
})
} else {
rollcall.redirectToLogin()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment