-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[frontend/backend] correct logout redirection #1790
Conversation
Signed-off-by: Marine LM <marine.lemezo@filigran.io>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1790 +/- ##
============================================
+ Coverage 32.07% 32.12% +0.05%
- Complexity 1609 1626 +17
============================================
Files 561 561
Lines 16845 17119 +274
Branches 973 1009 +36
============================================
+ Hits 5403 5500 +97
- Misses 11198 11373 +175
- Partials 244 246 +2 ☔ View full report in Codecov by Sentry. |
…page Signed-off-by: Marine LM <marine.lemezo@filigran.io>
Signed-off-by: Marine LM <marine.lemezo@filigran.io>
@@ -92,7 +93,7 @@ public ValidationErrorBag handleBadRequestExceptions(ImportException ex) { | |||
} | |||
|
|||
@ResponseStatus(HttpStatus.UNAUTHORIZED) | |||
@ExceptionHandler(AccessDeniedException.class) | |||
@ExceptionHandler(AuthenticationException.class) | |||
public ValidationErrorBag handleValidationExceptions() { | |||
ValidationErrorBag bag = | |||
new ValidationErrorBag(HttpStatus.UNAUTHORIZED.value(), "ACCESS_DENIED"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change default message for something more meaningful as UNATHORIZED is described as : "it lacks valid authentication credentials for the requested resource"
Signed-off-by: Marine LM <marine.lemezo@filigran.io>
Close : #1778
The user creation functionality worked correctly.
However, the issue was when clicking the logout button: the page displayed the login form, but the URL did not update accordingly.
Moreover i update the status code in the back
when a user is connected but don't have access the api return 404
when a user is not connected anymore and want to have access to some information the api return 401