Oneflow v0.1.1 Oneflow.Http.Authorization

This is the the module that allows generating the value for the x-oneflow-authorization header.

Link to this section Summary

Functions

Generates authentication header value given the request %Request{ method: :get, url: "/url"}. and the timestamp 1498601557

Link to this section Functions

Link to this function header_value(req, timestamp)

Generates authentication header value given the request %Request{ method: :get, url: "/url"}. and the timestamp 1498601557.

Returns "token:6f88d384bd48daed9bf03efad5d5b5bdf89f3063".

If the url contains a query string but the path is the same, the value must be the same.

Examples

iex> Oneflow.Http.Authorization.header_value(%Oneflow.Http.Request{ method: :get, path: “/url”}, 498601557) “token:6f88d384bd48daed9bf03efad5d5b5bdf89f3063”

iex> Oneflow.Http.Authorization.header_value(%Oneflow.Http.Request{ method: :get, path: “/url?foo=bar”}, 498601557) “token:6f88d384bd48daed9bf03efad5d5b5bdf89f3063”