Guardian.Serializer behaviour
Guardian Serializer Behaviour.
Guardian requires a serializer. This serializer is responsible for fetching the resource from the encoded value in the JWT and also encoding a resource into a String so that it may be stored in the JWT
Callbacks
Specs:
- for_token(object :: term) :: String.t
Serializes the object into the token. Suggestion: “User:2”
Specs:
De-serializes the object from a token