upvest v0.1.1 Upvest.AuthProvider protocol View Source

Protocol for API keys and OAuth authentication mechanisms supported by Upvest API.

This protocol requires one functions to be implemented: get_headers/4, which returns the HTTP authentation headers required by the associated endpoint.

Link to this section Summary

Functions

Verifies the given authentication parameters and returns authorization headers (or other info) to be attached to requests.

Link to this section Types

Link to this section Functions

Link to this function

get_headers(auth, method, path, body)

View Source
get_headers(
  auth :: Upvest.Client.auth(),
  method :: Upvest.http_method(),
  path :: String.t(),
  body :: map()
) :: {:ok, Upvest.headers()} | {:error, Upvest.error()}

Verifies the given authentication parameters and returns authorization headers (or other info) to be attached to requests.