Skip to content

Commit

Permalink
chore(auth): update comment on authenticatoin retry
Browse files Browse the repository at this point in the history
Spring Security support has been stabilised at Hawtio standalone, and now it
doesn't rely on the retry mechanism at hawtio-react. Updated the comment to
reflect the correct information.
  • Loading branch information
tadayosi committed Nov 28, 2023
1 parent 538ab70 commit 79f7314
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/hawtio/src/auth/user-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ class UserService implements IUserService {
if (!res.ok) {
log.error('Failed to fetch user:', res.status, res.statusText)
if (retry && res.status === 403) {
// Wait for 1000ms in case login session is not ready at server side
// This retry is mainly needed for Spring Security support
// Wait for 1000ms in case login session is not ready at server side.
// This retry was originally introduced for Spring Security support,
// but it no longer relies on the retry. Now it is kept mainly for
// additional resilience at authentication.
await new Promise(resolve => setTimeout(resolve, 1000))
return this.fetchUser(false)
}
Expand Down

0 comments on commit 79f7314

Please sign in to comment.