V
V
Vladyslav2021-02-09 00:11:53
Java
Vladyslav, 2021-02-09 00:11:53

How does Spring Security JWT work?

Hello everyone, as I understand it works according to the following scheme:
1) The client sends the entered login and password to the server
2.1) The server creates a token (if on JWT) and immediately checks it through JwtFilter doFilter() ?
2.2) If it's correct, the server sends it to the client, and the client can use the secured functions, right?
And it is the FilterRegistrationBean we created that sends us to check the token in doFilter (overridden method, right?)

And if we talk about OAuth 2:
As I understand it, JWT is a transfer format (JSON)
And OAuth is a transfer method, right? - Can you provide an example?

Thank you very much

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan, 2021-02-09
Hasanly @azerphoenix

Hello!
Here is a Spring Security JWT example
https://github.com/hantsy/spring-webmvc-jwt-sample
Here is a schematic of how JWT AUTH works
https://www.javainuse.com/spring/boot-jwt
I hope that could help you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question