Roberto Sánchez
2014-09-18 52ce72b22ef8d92a1f35b4993bcddaaa66d67350
securis/src/main/java/net/curisit/securis/security/SecurityInterceptor.java
....@@ -34,7 +34,7 @@
3434 // @PreMatching
3535 @Priority(Priorities.AUTHENTICATION)
3636 public class SecurityInterceptor implements javax.ws.rs.container.ContainerRequestFilter {
37
- private static final Logger log = LogManager.getLogger(SecurityInterceptor.class);
37
+ private static final Logger LOG = LogManager.getLogger(SecurityInterceptor.class);
3838
3939 @Inject
4040 private TokenHelper tokenHelper;
....@@ -59,7 +59,7 @@
5959 return;
6060 String token = servletRequest.getHeader(TokenHelper.TOKEN_HEADER_PÀRAM);
6161 if (token == null || !tokenHelper.isTokenValid(token)) {
62
- log.info("Access denied to '{}', Token not valid.", servletRequest.getPathInfo());
62
+ LOG.info("Access denied to '{}', Token not valid.", servletRequest.getPathInfo());
6363 containerRequestContext.abortWith(Response.status(Status.UNAUTHORIZED).build());
6464 } else {
6565 Securable sec = method.getAnnotation(Securable.class);
....@@ -69,7 +69,7 @@
6969 int userRoles = getUserRoles(username);
7070 // if (sec.roles() != 0) {
7171 // if ((sec.roles() & userRoles) == 0) {
72
- // log.info("User {} has no necessary role to access url: {}", username, servletRequest.getPathInfo());
72
+ // LOG.info("User {} has no necessary role to access url: {}", username, servletRequest.getPathInfo());
7373 // containerRequestContext.abortWith(Response.status(Status.UNAUTHORIZED).build());
7474 // }
7575 // }
....@@ -80,7 +80,7 @@
8080 containerRequestContext.setSecurityContext(scw);
8181 // Next line provide injection in resource methods
8282 ResteasyProviderFactory.pushContext(BasicSecurityContext.class, scw);
83
- log.debug("Added custom SecurityContext for user {}, orgs: {}", username, orgs);
83
+ LOG.debug("Added custom SecurityContext for user {}, orgs: {}", username, orgs);
8484 }
8585 }
8686