@Provider @ServerInterceptor public class PreProcessInterceptorForIsisSession implements PreProcessInterceptor { @Override public ServerResponse preProcess(final HttpRequest request, final ResourceMethod method) throws Failure, WebApplicationException { // TODO Auto-generated method stub return null; } }
@Provider @ServerInterceptor public class PreProcessInterceptorForIsisSession implements PreProcessInterceptor { @Override public ServerResponse preProcess(HttpRequest httpRequest, ResourceMethodInvoker resourceMethodInvoker) throws Failure, WebApplicationException { return null; } }
@Provider @ServerInterceptor public class PreProcessInterceptorForIsisSession implements PreProcessInterceptor { @Override public ServerResponse preProcess(final HttpRequest request, final ResourceMethod method) throws Failure, WebApplicationException { // TODO Auto-generated method stub return null; } }
@Provider @ServerInterceptor public class RestSecurityInterceptor implements PreProcessInterceptor { private static final Logger log = Logger.getLogger(RestSecurityInterceptor.class.getName()); @Override public ServerResponse preProcess(HttpRequest request, ResourceMethod method) throws UnauthorizedException { // pass public methods if (method.getResourceClass().equals(PublicServiceRest.class)) { return null; } // user not logged-in? if (AuthService.getCurrentAccount() == null) { ServerResponse response = new ServerResponse(); response.setStatus(HttpResponseCodes.SC_UNAUTHORIZED); MultivaluedMap<String, Object> headers = new Headers<Object>(); headers.add("Content-Type", "text/plain"); response.setMetadata(headers); response.setEntity("{\"code\":401, \"message\":\"HTTP error 401: Unauthorized to access " + request.getPreprocessedPath() + "\"" + ""); return response; } return null; } }
@Provider @ServerInterceptor public class Current implements PostProcessInterceptor {
@ServerInterceptor public class WarpResteasyInterceptor implements PreProcessInterceptor, PostProcessInterceptor, MessageBodyReaderInterceptor, MessageBodyWriterInterceptor {
@ServerInterceptor @Produces(org.overlord.sramp.atom.MediaType.APPLICATION_SRAMP_ATOM_EXCEPTION) @Consumes(org.overlord.sramp.atom.MediaType.APPLICATION_SRAMP_ATOM_EXCEPTION)
@Provider @ServerInterceptor @Precedence("SECURITY") public class Challenger implements PreProcessInterceptor {
@ServerInterceptor @ClientInterceptor @DecoderPrecedence
@ServerInterceptor @ClientInterceptor @EncoderPrecedence
@ServerInterceptor @Precedence("SECURITY") public class LoginPreProcessorInterceptor implements PreProcessInterceptor {