Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix: Add mac auth to token exchange

  • Loading branch information...
commit acb747d399057c10ae7b47fa7eef0c96ccd6ec78 1 parent 233cc3c
@jvatic jvatic authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/omniauth/strategies/tent.rb
View
6 lib/omniauth/strategies/tent.rb
@@ -74,7 +74,7 @@ def set_app(app)
end
def get_app
- @tent_app ||= get_state(:app)
+ @tent_app ||= Hashie::Mash.new(get_state(:app) || {})
end
def create_app
@@ -127,7 +127,9 @@ def verify_state!
end
def create_app_authorization!
- client = ::TentClient.new(get_state(:server_url))
+ client = ::TentClient.new(get_state(:server_url), :mac_key_id => get_app[:mac_key_id],
+ :mac_key => get_app[:mac_key],
+ :mac_algorithm => get_app[:mac_algorithm])
res = client.app.authorization.create(get_app[:id], :code => request.params['code'])
fail!(:app_creation_failure) if res.body.kind_of?(::String)
@app_authorization = Hashie::Mash.new(res.body)
Please sign in to comment.
Something went wrong with that request. Please try again.