Created
September 19, 2011 12:36
-
-
Save zuk/1226407 to your computer and use it in GitHub Desktop.
Basic rollcall.js authentication example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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