diff options
| author | Teddy Wing | 2014-06-08 02:26:54 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2014-06-08 02:26:54 -0400 | 
| commit | fc3ffbf67b129a18c706a51a5560dc055d864a1e (patch) | |
| tree | 589903d2eb5fd631297130714d1a2df8cdca7e1e | |
| parent | 6582e1f2c948457467cf2bd7a942d79cfdb63386 (diff) | |
| download | sellevate-fc3ffbf67b129a18c706a51a5560dc055d864a1e.tar.bz2 | |
app.rb: add Context.IO oauth routes/actions
* Require the FancyBear module
* Add a couple new methods to support authentication via Context.IO
| -rw-r--r-- | app.rb | 13 | 
1 files changed, 13 insertions, 0 deletions
| @@ -1,4 +1,5 @@  require 'sinatra' +require './fancy_bear/fancy_bear'  class App < Sinatra::Base    configure :production, :development do @@ -16,4 +17,16 @@ class App < Sinatra::Base    post '/sign-up' do      #    end +   +  get '/auth-begin' do +    contextio = FancyBear::ContextIO::Auth.new +     +    redirect_url = contextio.connect("#{request['REQUEST_URI']}/auth-callback") +     +    redirect to(redirect_url) +  end +   +  get '/auth-callback' do +    erb :auth_callback +  end  end | 
