anchor.diff:  %% @end
   %%--------------------------------------------------------------------
   -spec verify(token(), secret(), aai:auth_ctx(), [caveats:type()]) ->
  -    {ok, aai:auth()} | {error, term()}.
  +    {ok, aai:auth()} | errors:error().
   verify(Token = #token{macaroon = Macaroon}, Secret, AuthCtx, SupportedCaveats) ->
       Verifier = caveats:build_verifier(AuthCtx, SupportedCaveats),
       try macaroon_verifier:verify(Verifier, Macaroon, Secret) of
  
positive.code: %% Deserializes a token from portable binary form.
  %% @end
  %%--------------------------------------------------------------------
  -spec deserialize(serialized()) -> {ok, token()} | {error, term()}.
  deserialize(<<>>) -> ?ERROR_BAD_TOKEN;
  deserialize(Serialized) ->
      try
  
negative.code: %% Serializes a token to portable binary form.
  %% @end
  %%--------------------------------------------------------------------
  -spec serialize(token()) -> {ok, serialized()} | errors:error().
  serialize(Token) ->
      try
          {ok, Token64} = macaroon:serialize(Token#token.macaroon),
  