-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This extension supports responding with a "problem"
- if an authentication if required, but not given, see UnauthorizedExceptionMapper
- if a valid authentication is given, but role is forbidden to access the requested resource, see ForbiddenExceptionMapper
There is one more case:
- A resource requires authentication, an authentication is given, but invalid.
Imagine one more test in TestResourceIT:
@QuarkusTest
public class TestResourceIT {
...
@Test
void restrictedAuthenticationInvalid() {
given()
.auth()
.preemptive()
.basic("scott", "wrongpass")
.when()
.get("/test/restricted")
.then()
.statusCode(UNAUTHORIZED.getStatusCode())
.body("status", is(UNAUTHORIZED.getStatusCode()));
}
For time being, this extension seems not to catch this case, an empty body (401 HTTP status code) is being returned.
Feature request
Please add to this extension, that if a given authentication is invalid, a valid API "problem" will be returned.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request