ivar v0.10.1 Ivar.Auth
Ivar.Auth manages the authentication credentials used for a request
Summary
Functions
Puts the given credentials under auth_type into the existing request map
Functions
Puts the given credentials under auth_type into the existing request map
Args
request- the map used to store the credentials, usually created viaIvar.new/2credentials- the credentials to be used for authenticationauth_type- an atom for the type of authentication to be used (:basicor:bearer)
Credentials
:basicauth tuple -{"username", "password"}:bearertoken -"some.token"
Usage
iex> Ivar.Auth.put(%{}, {"user", "pass"}, :basic)
%{auth: {"authorization", "Basic dXNlcjpwYXNz"}}