anchor.diff:  
             session = #watts_rsp_session{}
            }).
  -
  -show_rsa(File) ->
  -    {ok, Bin} = file:read_file(File),
  -    [PemEntry] = public_key:pem_decode(Bin),
  -    Key = public_key:pem_entry_decode(PemEntry),
  -    {E, N} =
  -        case Key of
  -            #'RSAPrivateKey'{} ->
  -                 {Key#'RSAPrivateKey'.modulus
  -                 ,Key#'RSAPrivateKey'.publicExponent};
  -            #'RSAPublicKey'{} ->
  -                 {Key#'RSAPublicKey'.modulus
  -                 ,Key#'RSAPublicKey'.publicExponent}
  -        end,
  -    NEnc = base64url:encode(binary:encode_unsigned(N)),
  -    EEnc = base64url:encode(binary:encode_unsigned(E)),
  -    io:format("n: ~p, e: ~p ~n",[N, E]),
  -    io:format("n: ~p, e: ~p ~n",[NEnc, EEnc]),
  -    ok.
  -
   
   
   get_list() ->
  
positive.code: 
  
  
  validate_jwt(JwtData) ->
      Jwt = erljwt:pre_parse_jwt(JwtData),
      validate_jwt(Jwt, JwtData).
  
  validate_jwt(#{ claims := #{iss := Iss,
                              sub := _Sub,
                              exp := _Exp,
                              iat := _Iat,
                              watts_service := _Service
                             },
                  header := #{ kid := KeyId, alg := <<"RS256">>}
                } , JwtData) ->
      Rsp = get_info(Iss),
      Keys = Rsp#watts_rsp.keys,
      FilterKey = fun(#{kid := Kid}) ->
                          Kid == KeyId;
                     (_) ->
                          false
                  end,
      Jwt =   case lists:filter(FilterKey, Keys) of
                  [] ->
                      no_key;
                  [#{key := Key}] ->
                      erljwt:parse_jwt(JwtData, Key, <<"JWT">>);
                  [_] ->
                      bad_key;
                  _ ->
                      too_many_keys
              end,
      {Jwt, Rsp};
  validate_jwt(_, _) ->
      {invalid, unknown}.
  
negative.code:         [Rsp] -> Rsp;
          _ -> #watts_rsp{}
      end.
  
  
  validate_jwt_get_rsp(JwtData, Referer) ->
      update_rsp_on_success(validate_jwt(JwtData), Referer).
  