Class: WeConnect::Connection::WeConnectMiddleware
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- WeConnect::Connection::WeConnectMiddleware
- Defined in:
- lib/weconnect/connection.rb
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/weconnect/connection.rb', line 20 def call(env) response = @app.call(env) if location = response['location'] raise WeconnectAuthenticated.new(location) if location['weconnect:'] end response end |