Author: vjrj_ Date: 2012-04-03 15:42:14 +0200 (Tue, 03 Apr 2012) New Revision: 1825 Modified: openfireauth/pom.xml openfireauth/src/main/java/cc/kune/core/server/auth/openfire/KuneAuthProvider.java Log: open auth connector improved Modified: openfireauth/pom.xml =================================================================== --- openfireauth/pom.xml 2012-04-03 13:34:06 UTC (rev 1824) +++ openfireauth/pom.xml 2012-04-03 13:42:14 UTC (rev 1825) @@ -39,17 +39,7 @@ <dependency> <groupId>cc.kune</groupId> <artifactId>kune-services</artifactId> - <version>0.1.0-SNAPSHOT</version> - <exclusions> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </exclusion> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - </exclusions> + <version>0.1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>com.google.gwt</groupId> Modified: openfireauth/src/main/java/cc/kune/core/server/auth/openfire/KuneAuthProvider.java =================================================================== --- openfireauth/src/main/java/cc/kune/core/server/auth/openfire/KuneAuthProvider.java 2012-04-03 13:34:06 UTC (rev 1824) +++ openfireauth/src/main/java/cc/kune/core/server/auth/openfire/KuneAuthProvider.java 2012-04-03 13:42:14 UTC (rev 1825) @@ -21,7 +21,7 @@ public class KuneAuthProvider implements AuthProvider { public static final Log LOG = LogFactory.getLog(KuneAuthProvider.class); - private static final String USER_NOT_LOGGED = "User not logged"; + private static final String USER_NOT_LOGGED = "User \'%s\' authentication failed"; private final String publicAddress; private UserService userService; @@ -40,10 +40,10 @@ // http://googlewebtoolkit.blogspot.com.es/2010/07/gwtrpccommlayer-extending-gw... try { final URL url = new URL("http://" + publicAddress + "/ws/UserService"); - LOG.error("Service access URL: " + url); + LOG.info("Service access URL: " + url); final GwtRpcService service = GwtRpcService.FACTORY.newInstance(); userService = service.create(url, UserService.class); - LOG.error("UserService created"); + LOG.info("UserService created"); } catch (final Exception e) { LOG.error("Error starting auth provider", e); } @@ -54,12 +54,13 @@ throws UnauthorizedException { try { userService.checkUserAndHash(username, passwdOrToken); - LOG.info(String.format("User %s logged", username)); + LOG.info(String.format("User \'%s\' logged", username)); } catch (final Exception e) { - LOG.error(USER_NOT_LOGGED, e); - throw new UnauthorizedException(USER_NOT_LOGGED, e); + final String msg = String.format(USER_NOT_LOGGED, username); + LOG.warn(msg); + throw new UnauthorizedException(msg); } - LOG.info(String.format("User %s logged", username)); + LOG.info(String.format("User \'%s\' logged", username)); } @Override