Interface UnauthorizedHandler

    • Method Detail

      • buildResponse

        default @Nullable javax.ws.rs.core.Response buildResponse​(String prefix,
                                                                  String realm)
      • buildException

        default RuntimeException buildException​(String prefix,
                                                String realm)
        This method allows overriding the exception thrown from an AuthFilter instance. This provides the possibility to catch auth exceptions in a custom ExceptionMapper. To process the exception in a custom ExceptionMapper, the response entity MUST be empty when using a subclass of WebApplicationException. Else the ExceptionMapper won't get invoked. The default implementation of this method creates a WebApplicationException containing the response built in buildResponse(String, String).
        Since:
        2.1.0