lib/yao/faraday_middlewares.rb in yao-0.3.2 vs lib/yao/faraday_middlewares.rb in yao-0.3.3
- old
+ new
@@ -20,11 +20,11 @@
@token = token
end
def call(env)
if @token.expired?
- @token.reflesh(Yao.default_client.default)
+ @token.refresh(Yao.default_client.default)
end
env[:request_headers]['X-Auth-Token'] = @token.to_s
@app.call(env)
end
@@ -49,10 +49,10 @@
end
private
ALLOWED_REQUESTS = [
- {method: :post, path: "/v2.0/tokens"}
+ {method: :post, path: "/tokens"}
]
def allowed_request?(env)
return true if env[:method] == :get