Piazza.Crypto.License (piazza_core v0.3.8) View Source

Genserver for managing the license verification lifecycle. The protocol is basically:

  1. On start, decode the license and pass to either on_failure or on_verify depending on the result.
  2. At a fixed interval, reverify the license, in case it's expired/changed.

The verification interval can be configured with

config :piazza_core, :license_interval, interval_in_ms

Link to this section Summary

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

fetch(pid \\ __MODULE__)

View Source

Callback implementation for GenServer.init/1.

Link to this function

start_link(license, public_key, on_failure, on_verify \\ fn _, state -> state end)

View Source