View Source Cosmox.Auth (Cosmox v0.1.1)

Handles the generation of the authorisation token for every REST call to CosmosDB.

Link to this section Summary

Functions

Generates the authorisation signature from the resource types.

Link to this section Types

@type resource_type() :: :dbs | :colls | :docs | :sprocs | :pkranges

Link to this section Functions

Link to this function

generate_master_key_authorization_signature(verb, resource_type, resource_link, date, key)

View Source
@spec generate_master_key_authorization_signature(
  verb :: binary(),
  resource_type :: resource_type(),
  resource_link :: binary(),
  date :: binary() | NaiveDateTime.t(),
  key :: binary()
) :: {:ok, binary()} | {:error, binary()}

Generates the authorisation signature from the resource types.