Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added Gemfile

  • Loading branch information...
commit 5195dbc710600a75e3d5be8656578572ec5e2406 1 parent 7080aed
@Gazler authored
Showing with 4 additions and 1 deletion.
  1. +2 −0  consumer/Gemfile
  2. +2 −1  consumer/app.rb
View
2  consumer/Gemfile
@@ -0,0 +1,2 @@
+gem 'sinatra'
+gem 'oauth2'
View
3  consumer/app.rb
@@ -4,7 +4,7 @@
enable :sessions
def client
- OAuth2::Client.new("mTeZFqkCmzc8JnjKXaSww95bFFxhUpp1wwmSi8vG", "a9OMyEdW7JvWThHmmvFcShR9P2dyad3EGuA2ULDh", :site => "http://localhost:3000")
+ OAuth2::Client.new("AbDQemXExwuWGhLHNX4JV2rfkw4g4rV4b57LCxnT", "qzyA6SW5G7yjyn6iJnQeaNh6pqU5jYfHknNnTQRG", :site => "http://localhost:3000")
end
get "/auth/test" do
@@ -29,6 +29,7 @@ def client
def get_response(url)
access_token = OAuth2::AccessToken.new(client, session[:access_token])
+ p access_token
JSON.parse(access_token.get("/api/v1/#{url}").body)
end
Please sign in to comment.
Something went wrong with that request. Please try again.