diff --git a/src/java/com/rjconsultores/ventaboletos/rest/SecurityInterceptor.java b/src/java/com/rjconsultores/ventaboletos/rest/SecurityInterceptor.java index 9540ae9be..23bc6f750 100644 --- a/src/java/com/rjconsultores/ventaboletos/rest/SecurityInterceptor.java +++ b/src/java/com/rjconsultores/ventaboletos/rest/SecurityInterceptor.java @@ -1,31 +1,35 @@ package com.rjconsultores.ventaboletos.rest; -import java.lang.reflect.Method; -import java.text.SimpleDateFormat; -import java.util.Arrays; -import java.util.Calendar; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +//import java.lang.reflect.Method; +//import java.text.SimpleDateFormat; +//import java.util.Arrays; +//import java.util.Calendar; +//import java.util.HashSet; +//import java.util.List; +//import java.util.Set; +// +//import javax.annotation.security.PermitAll; +//import javax.annotation.security.RolesAllowed; +//import javax.ws.rs.WebApplicationException; +//import javax.ws.rs.ext.Provider; +// +//import org.apache.commons.codec.binary.Base64; +//import org.jboss.resteasy.annotations.interception.ServerInterceptor; +//import org.jboss.resteasy.core.Headers; +//import org.jboss.resteasy.core.ResourceMethod; +//import org.jboss.resteasy.core.ServerResponse; +//import org.jboss.resteasy.spi.Failure; +//import org.jboss.resteasy.spi.HttpRequest; +//import org.jboss.resteasy.spi.interception.PreProcessInterceptor; +//import org.mindrot.jbcrypt.BCrypt; -import javax.annotation.security.PermitAll; -import javax.annotation.security.RolesAllowed; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.ext.Provider; - -import org.apache.commons.codec.binary.Base64; -import org.jboss.resteasy.annotations.interception.ServerInterceptor; -import org.jboss.resteasy.core.Headers; -import org.jboss.resteasy.core.ResourceMethod; -import org.jboss.resteasy.core.ServerResponse; -import org.jboss.resteasy.spi.Failure; -import org.jboss.resteasy.spi.HttpRequest; -import org.jboss.resteasy.spi.interception.PreProcessInterceptor; -import org.mindrot.jbcrypt.BCrypt; - -@Provider -@ServerInterceptor -public class SecurityInterceptor implements PreProcessInterceptor { +//@ServerInterceptor +//@Provider +// FIXME: Há uma diferença das versões 2.x para 3.x do resteasy onde a interface PreProcessInterceptor foi removida. Com isso não é possível utilizar esta abordagem para o JBoss 6, EAP 7 e Wildfly 16 +// OBS: Esta implementação não estava ativa. Quando a mesma for implementada, a segurança deverá ser feita para casa requisição REST +public class SecurityInterceptor /*implements PreProcessInterceptor*/ { + + /* private static final String AUTHORIZATION_PROPERTY = "AuthorizationSecurity"; private static final String AUTHENTICATION_SCHEME = "Basic"; private static final String ROLE_CHECK = "EMBARCADA_DISABLE"; @@ -96,5 +100,5 @@ public class SecurityInterceptor implements PreProcessInterceptor { } return false; - } + }*/ }