Class: Userbin::ParseSignedJSON
- Inherits:
-
Faraday::Response::Middleware
- Object
- Faraday::Response::Middleware
- Userbin::ParseSignedJSON
- Defined in:
- lib/userbin/basic_auth.rb
Instance Method Summary collapse
Instance Method Details
#on_complete(env) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/userbin/basic_auth.rb', line 20 def on_complete(env) json = MultiJson.load(env[:body], symbolize_keys: true) signature = env[:response_headers]['x-userbin-signature'] json[:signature] = signature if signature env[:body] = { data: json, errors: [], metadata: {} } end |