Skip to content

Support failed authentication, too #36

@SchulteDev

Description

@SchulteDev

This extension supports responding with a "problem"

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

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions