curator v0.2.3 Curator.Guardian.Token.Opaque.Persistence behaviour View Source

The opaque token can be stored in many different backends. This is the behaviour those backends must implement

Link to this section Summary

Callbacks

Create a token

Delete a token

Get a Token

Link to this section Types

Link to this section Callbacks

Link to this callback create_token(claims) View Source
create_token(claims()) :: {:ok, token()} | {:error, any()}

Create a token

Link to this callback delete_token(token_id) View Source
delete_token(token_id()) :: {:ok, token()} | {:error, any()}

Delete a token

Link to this callback get_token(token_id) View Source
get_token(token_id()) :: {:ok, token()} | {:error, any()}

Get a Token