Created
December 24, 2011 23:02
-
-
Save afeld/1518504 to your computer and use it in GitHub Desktop.
Assistly multipass SSO
This file contains hidden or 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
| multipass = MultiPass.encode( | |
| 'jux', | |
| api_key, | |
| :customer_name => current_user.displayname, | |
| :customer_email => current_user.email, | |
| :customer_custom_username => current_user.username, | |
| :uid => current_user.id, | |
| :expires => (Time.now + 120), # Expire two minutes from now | |
| :url_safe => true # Convert unsafe characters | |
| ) | |
| escaped_multipass = URI.escape(multipass, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")) | |
| redirect_to "http://helpers.jux.com/customer/authentication/multipass/callback?multipass=#{multipass}" # hmm, should be using 'escaped_multipass'...? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment