View Source Avalanche.JWTs.JWTBehaviour behaviour (Avalanche v0.13.0)

Summary

Callbacks

Link to this callback

create_signer(binary, map)

View Source
@callback create_signer(binary(), map()) :: map()
Link to this callback

generate_claims(keyword, binary)

View Source
@callback generate_claims(
  keyword(),
  binary()
) :: {:ok, map()} | {:error, atom() | keyword()}
@callback peek_claims(binary()) :: {:ok, binary()} | {:error, atom() | keyword()}
@callback peek_header(binary()) :: {:ok, binary()} | {:error, atom() | keyword()}
@callback sign(map(), map()) :: {:ok, binary()} | {:error, binary()}