Routemaster Client v0.3.0 Routemaster.Middleware.BasicAuth View Source
Dynamic Basic authentication middleware.
Used in place of Tesla’s builtin BasicAuth middleware because that freezes the token at compile time and requires a clunky workaround to read it dynamically.
This middleware does not require any option and automatically reads the token from the application configuration.
Example:
defmodule MyClient do
use Tesla
plug Routemaster.Middleware.BasicAuth
end