From ac0acf74f443dbedce3ea52eaa797b1fa55f7a25 Mon Sep 17 00:00:00 2001 From: alberto Date: Wed, 27 Nov 2019 13:47:14 +0000 Subject: [PATCH] =?UTF-8?q?Refatorar=20ADM=20para=20que=20m=C3=B3dulo=20Re?= =?UTF-8?q?st=20fique=20compat=C3=ADvel=20com=20wildfly=2016/java=2011=20b?= =?UTF-8?q?ug#17266=20dev:trevezani=20qua:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@99067 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../rest/SecurityInterceptor.java | 56 ++++++++++--------- 1 file changed, 30 insertions(+), 26 deletions(-) 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; - } + }*/ }