title: JWT getHeader return null
body: <p>When I send a token it works, but when I send a request to receive data the function getheader() returns null.</p>
  
  <pre><code>public class JWTAuthorizationFilter extends OncePerRequestFilter{
  
  @Override
  protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
          throws ServletException, IOException {
  
      //recuperer de la requete envoyer dans jwt le header du token
      String jwt =request.getHeader(SecurityConstants.HEADER_STRING);
      System.out.println("authori");
      System.out.println(jwt);
      if(jwt==null ) {
          //faire le filtre 
          filterChain.doFilter(request, response);
          return;
      }
      Claims claims=Jwts.parser()
              .setSigningKey(SecurityConstants.SECRET)//signer avec le secret
              //parser et remplace le TOKEN_PREFIX par chaine vide
              .parseClaimsJws(jwt.replaceAll(SecurityConstants.TOKEN_PREFIX, ""))
              //recuper le corps du token
              .getBody();
  
       String username =claims.getSubject();
       //returne tableau d'objet qui contient les roles du user
       ArrayList&lt;Map&lt;String,String&gt;&gt; roles=(ArrayList&lt;Map&lt;String,String&gt;&gt;) claims.get("role");
       Collection&lt;GrantedAuthority&gt; authorities=new ArrayList&lt;&gt;();
       //parcourire et recuperer les role de mon token
       roles.forEach(r-&gt;{
          authorities.add(new SimpleGrantedAuthority(r.get("authority"))); 
       });
       //mettre dans authenticatedUserToken le nom et authoriter d'un utilisateur authentifier dans le token 
       UsernamePasswordAuthenticationToken  authenticatedUserToken=
               new UsernamePasswordAuthenticationToken(username,null,authorities);
       //charger l'identiter dans le context de l'application
       SecurityContextHolder.getContext().setAuthentication(authenticatedUserToken);
       filterChain.doFilter(request, response);
      } 
  
  }
  </code></pre>
  
  <p>this is from securConfigure</p>
  
  <pre><code>http.addFilter(new JWTAuthenticationFilter(authenticationManager()))
  
      .addFilterBefore(new JWTAuthorizationFilter(),UsernamePasswordAuthenticationFilter.class);
  </code></pre>
  
  <p><strong>Here I sent authentification everything ok I get my token:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/5VpJV.png" alt="enter image description here"></p>
  
  <p><strong>Here I try to get service:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/Svk0G.png" alt="enter image description here"></p>
  
  <p><strong>Here what test console in JWTAuthorization display where I call <code>resquest.getHeader()</code></strong></p>
  
  <p><img src="https://i.stack.imgur.com/U6NSk.png" alt="enter image description here"></p>