I'm currently using TokenBasedRememberMeServices to implement automatic login, but there's a problem that Authentication Exception is thrown when loading UserByUsername is executed But this place does not deal with the exception, and the client will have 500 errors. Must a custom class extend TokenBasedRememberMeServices and handle the exception itself?
Comment From: rwinch
Can you provide some more details. For example, what is the complete stacktrace? What is the invalid value?
Comment From: zhlqee
@rwinch I'm sorry to forgive my incorrect statement. The scene is like this. Our front-end engineer logged in an account while debugging the page and chose to stay logged in. The back-end service we were connecting to was the production environment, and then switched to the test environment to debug BUG, but the account was not in the test environment, nor did the front-end engineer clean up the local cookie and re-enter the system. 500 errors occurred in the same time. Log analysis shows that UserDetails userDetails = getUserDetailsService (). loadUserByUsername (cookieTokens @[0]); an error occurred on this line, specifically when the loadUserByUsername throws an Authentication Exception, but this code does not do anything about this exception.
Comment From: rwinch
Can you please provide the complete stacktrace?
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.