Package io.dropwizard.auth
Interface UnauthorizedHandler
-
- All Known Implementing Classes:
DefaultUnauthorizedHandler,JSONUnauthorizedHandler
public interface UnauthorizedHandler
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default RuntimeExceptionbuildException(String prefix, String realm)This method allows overriding the exception thrown from anAuthFilterinstance.default @Nullable javax.ws.rs.core.ResponsebuildResponse(String prefix, String realm)
-
-
-
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 anAuthFilterinstance. This provides the possibility to catch auth exceptions in a customExceptionMapper. To process the exception in a customExceptionMapper, the response entity MUST be empty when using a subclass ofWebApplicationException. Else theExceptionMapperwon't get invoked. The default implementation of this method creates aWebApplicationExceptioncontaining the response built inbuildResponse(String, String).- Since:
- 2.1.0
-
-