Instream v0.9.0 Instream.Query.Headers
Header Utility.
Summary
Functions
Specs
assemble_auth(Keyword.t) :: list
Assembles headers for basic authentication.
Will return an empty list if query authentication is configured. Will return an empty list if either username of password is missing.
Usage
iex> assemble_auth([ method: :query ])
[]
iex> assemble_auth([ username: "user" ])
[]
iex> assemble_auth([ password: "pass" ])
[]
iex> assemble_auth([ username: "user", password: "pass" ])
[{'Authorization', 'Basic dXNlcjpwYXNz'}]