Created
September 7, 2011 23:40
-
-
Save kbuckler/1202175 to your computer and use it in GitHub Desktop.
Dead simple remote auth server
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
require 'rubygems' | |
require 'sinatra' | |
get '/auth' do | |
name = "Kenny" | |
email = "kenny@zendesk.com" | |
token = "" | |
remote_photo_url = "http://blog.earthandpawtotems.com/wp-content/uploads/2011/04/honeybadger.jpg" | |
timestamp = params[:timestamp] | |
hash = Digest::MD5.hexdigest( name + email + remote_photo_url + token + timestamp ) | |
redirect params[:return_to] + "?name=#{name}&email=#{email}&hash=#{hash}×tamp=#{timestamp}&remote_photo_url=#{remote_photo_url}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment