anchor.diff:  -module(watts_rsp).
   -include("watts.hrl").
   -include_lib("public_key/include/public_key.hrl").
  +
   
   -export([new/1,
            exists/1,
  
positive.code:     {error, {bad_jwt, Error}, return_url(Rsp, JwtMap, Referer) }.
  
  
  
  
  
  
  validate_jwt(Jwt) ->
      {ok, JwtMap} = erljwt:to_map(Jwt),
      Rsp = get_rsp(JwtMap),
      validate_jwt(erljwt:validate(Jwt, [rs256], #{}, Rsp#watts_rsp.keys),
                   Rsp, JwtMap).
  
  get_rsp(#{claims := #{ iss := Iss}}) ->
  
negative.code: validate_jwt({error, Error}, Rsp, JwtMap) ->
      {Error, Rsp, JwtMap}.
  
  jwt_get_success_url(Claims) ->
      maps:get(success_url, Claims, undefined).
  
  