Comments (2)
Hi! Yes, of course you can implement the PersonRestService with MyBatis. Please search the web how to do that in Spring in detail. You rather can implement this service in any way (or with any data source) you want. You just have to look how to integrate it in Spring.
To the second part of your question:
I'm not sure what you mean. The token has actually a field (or claim) "created". You could check if that date is too old (expired) and reject the authentication in JwtAuthenticationTokenFilter#doFilterInternal. There is a rest point under AuthenticationRestController#refreshAndGetAuthenticationToken where you could refresh an existing token. In JwtTokenUtil#refreshToken you can see that in that case a new token is generated with an updated "created" field.
I would try to avoid a blacklist table in the database with expired token hashes because this table can grow very large. But feel free to do that if you want to blacklist tokens ;)
I hope this comment answers your questions. Please give me a feedback so I can close this ticket.
from jwt-spring-security-demo.
Yes i want to want to blacklist tokens. but as you advoise,i should does't use it ,and use The token has actually a field (or claim) "created" instead. Thank you very much!
from jwt-spring-security-demo.
Related Issues (20)
- HI, why ADMIN not ROLE_ADMIN ? HOT 2
- Unable to access API via curl HOT 4
- Token Invalidation HOT 5
- dependency injection problem HOT 1
- Share DB schema HOT 2
- String cannot be resolved to a type HOT 2
- where does BCryptPasswordEncoder be used? HOT 2
- Add an endpoint for refreshing tokens HOT 7
- SecurityContextHolder setAuthentication is unused?
- setting JWTs in local storage is a security risk. HOT 1
- Save new user
- Dependency org.apache.tomcat.embed:tomcat-embed-core, leading to CVE problem HOT 2
- Dependency org.apache.tomcat.embed:tomcat-embed-core, leading to CVE problem HOT 1
- Error executing DDL "# noinspection SqlNoDataSourceInspectionForFile" via JDBC Statement HOT 1
- problem starting app
- CrossOrgin HOT 2
- AuthenticationRestController.createAuthenticationToken getting UserDetails twice HOT 1
- Encoded password does not look like BCrypt HOT 2
- JwtAuthenticationEntryPoint implements Serializable HOT 1
- canTokenBeRefreshed is reduntant HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jwt-spring-security-demo.