@@ -0,0 +1,399 @@
+package com.bq.oss.lib.ws.auth;%0A%0Aimport io.dropwizard.auth.UnauthorizedHandler;%0A%0Aimport javax.ws.rs.core.Response;%0A%0Aimport com.bq.oss.lib.ws.api.error.ErrorResponseFactory;%0A%0Apublic class JsonUnauthorizedHandler implements UnauthorizedHandler %7B%0A%0A    @Override%0A    public Response buildResponse(String prefix, String realm) %7B%0A        return ErrorResponseFactory.getInstance().unauthorized();%0A    %7D%0A%0A%7D%0A

add json unathorized dropwizard handler