title: How to get email from generated token
body: <p>Hi I'm trying to get the email user from the given token. I've tried this to parse the token but I always got empty or <code>{}</code> value according to this <a href="https://github.com/tymondesigns/jwt-auth/wiki/Authentication" rel="nofollow">example</a> :</p>
  
  <pre><code>public function getAuthenticatedUser()
      {
          try {
              if (! $user = JWTAuth::parseToken()-&gt;authenticate()) {
                  return response()-&gt;json(['user_not_found'], 404);
              }
  
          } catch (Tymon\JWTAuth\Exceptions\TokenExpiredException $e) {
  
              return response()-&gt;json(['token_expired'], $e-&gt;getStatusCode());
  
          } catch (Tymon\JWTAuth\Exceptions\TokenInvalidException $e) {
  
              return response()-&gt;json(['token_invalid'], $e-&gt;getStatusCode());
  
          } catch (Tymon\JWTAuth\Exceptions\JWTException $e) {
  
              return response()-&gt;json(['token_absent'], $e-&gt;getStatusCode());
  
          }
  
          // the token is valid and we have found the user via the sub claim
          return $user;
      }
  </code></pre>
  
  <p>I put the token on the url like this localhost:8000/admin/user/get_all?token={{token}}, I also add the token in the header as <code>token</code> NOTE : I'm using <strong>postman</strong> to make the request. But when I try to pass the parse value to the response I always got <code>{}</code> value :</p>
  
  <pre><code>$result = $this-&gt;getAuthenticatedUser();
  return response()
              -&gt;json([
                'status'=&gt;'success',
                'user'=&gt;$result,
                'data'=&gt; $users,
              ]);
  </code></pre>
  
  <p>Correct me if I'm wrong here : parse meaning to get the info of the authenticate user such as email? <br>
  Note : I'm using laravel 5.2, and on the route I've builtin middleware jwt-auth and I'm using this <a href="https://github.com/tymondesigns/jwt-auth" rel="nofollow">library for generate the token</a>.</p>