faraday/docs/middleware/request/authentication.md
Alexander Popov 680b9f8a6c Add EditorConfig file
Resolve issues.

More info here: https://editorconfig.org/
2020-04-19 22:56:50 +02:00

653 B

layout title permalink hide next_name next_link top_name top_link
documentation Authentication Middleware /middleware/authentication true Multipart Middleware ./multipart Back to Middleware ./list

Basic and Token authentication are handled by Faraday::Request::BasicAuthentication and Faraday::Request::TokenAuthentication respectively. These can be added as middleware manually or through the helper methods.

Basic Authentication

Faraday.new(...) do |conn|
  conn.basic_auth('username', 'password')
end

Token Authentication

Faraday.new(...) do |conn|
  conn.token_auth('authentication-token')
end