Refatorar ADM para que módulo Rest fique compatível com wildfly 16/java 11
bug#17266 dev:trevezani qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@99067 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6949c17c88
commit
ac0acf74f4
|
@ -1,31 +1,35 @@
|
||||||
package com.rjconsultores.ventaboletos.rest;
|
package com.rjconsultores.ventaboletos.rest;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
//import java.lang.reflect.Method;
|
||||||
import java.text.SimpleDateFormat;
|
//import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
//import java.util.Arrays;
|
||||||
import java.util.Calendar;
|
//import java.util.Calendar;
|
||||||
import java.util.HashSet;
|
//import java.util.HashSet;
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
import java.util.Set;
|
//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;
|
//@ServerInterceptor
|
||||||
import javax.annotation.security.RolesAllowed;
|
//@Provider
|
||||||
import javax.ws.rs.WebApplicationException;
|
// 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
|
||||||
import javax.ws.rs.ext.Provider;
|
// 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*/ {
|
||||||
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 {
|
|
||||||
private static final String AUTHORIZATION_PROPERTY = "AuthorizationSecurity";
|
private static final String AUTHORIZATION_PROPERTY = "AuthorizationSecurity";
|
||||||
private static final String AUTHENTICATION_SCHEME = "Basic";
|
private static final String AUTHENTICATION_SCHEME = "Basic";
|
||||||
private static final String ROLE_CHECK = "EMBARCADA_DISABLE";
|
private static final String ROLE_CHECK = "EMBARCADA_DISABLE";
|
||||||
|
@ -96,5 +100,5 @@ public class SecurityInterceptor implements PreProcessInterceptor {
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue