Method: Restforce::Middleware::Authentication#call

Defined in:
lib/restforce/middleware/authentication.rb

#call(env) ⇒ Object

Rescue from 401’s, authenticate then raise the error again so the client can reissue the request.



16
17
18
19
20
21
# File 'lib/restforce/middleware/authentication.rb', line 16

def call(env)
  @app.call(env)
rescue Restforce::UnauthorizedError
  authenticate!
  raise
end