ExNudge.VAPID (ExNudge v1.0.1)

View Source

Handles VAPID (Voluntary Application Server Identification) authentication.

Summary

Types

vapid_keys()

@type vapid_keys() :: %{public: binary(), private: binary()}

Functions

generate_vapid_keys()

@spec generate_vapid_keys() :: %{public_key: String.t(), private_key: String.t()}

get_keys()

@spec get_keys() :: {:ok, vapid_keys()} | {:error, atom()}

sign_jwt(endpoint, map)

@spec sign_jwt(String.t(), vapid_keys()) :: {:ok, String.t()} | {:error, atom()}