8 thoughts to “Spring Boot 2 JWT Authentication with Spring Security”

  1. Hello! I liked a lot of your content. Can you say what is common when we use REST requisitions with tokens for confirming a user? When we use it, we always do a new query to the database to confirm the user. Is it the most common? I am really confused by this detail. This seems to consume a lot of resources. I believe that with your experience you can help us. Thank you excellent post skin

    // extract user information
    String username = tokenProvider.getUserNameFromJwtToken(jwt);
    UserDetails userDetails = userDetailsService.loadUserByUsername(username);

    // create AuthenticationToken
    UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
    authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));

  2. This tutorial is actually good, it helps new developers who use Spring Security. Thanks!

  3. I’m definitely enjoying what you write in this Spring Security tutorial!
    Fantastic blog and fantastic content.

  4. It’s difficult to find experienced people for this Spring Boot Security topic, but you give me good explanation! Thanks!

  5. Your posts are constructed clearly and have complex explanation, JWT based security is now easy for me, thanks!

  6. The clarity in your post is merely cool and I could assume you are an expert on this subject matter.
    Thanks a lot a million!

Comments are closed to reduce spam. If you have any question, please send me an email.