KuneAuthProvider implements AuthProvider { @Override public void authenticate(final String username, final String passwdOrToken) throws UnauthorizedException { try { userService.checkUserAndHash(username, passwdOrToken); LOG.info(String.format("User \'%s\' logged", username)); } catch (final Exception e) { final String msg = String.format(USER_NOT_LOGGED, username); LOG.warn(msg, e); throw new UnauthorizedException(msg); } LOG.info(String.format("User \'%s\' logged", username)); } KuneAuthProvider();  KuneAuthProvider(final String publicAddress, final Boolean ssl); static void main(final String[] args); @Override void authenticate(final String username, final String passwdOrToken); @Override int getIterations(final String arg0); @Override String getPassword(final String arg0); @Override String getSalt(final String arg0); @Override String getServerKey(final String arg0); @Override String getStoredKey(final String arg0); @Override boolean isScramSupported(); @Override void setPassword(final String arg0, final String arg1); @Override boolean supportsPasswordRetrieval(); static final Log LOG; }
@Test(expected = UnauthorizedException.class) public void wrongFileSession() throws UnauthorizedException, ConnectionException, InternalUnauthenticatedException, ClassNotFoundException, IllegalAccessException, InstantiationException { final KuneAuthProvider auth = new KuneAuthProvider(); auth.authenticate("admin", "6rzonw7n39p01td1p0rfujvu3a"); }
@Test(expected = UnauthorizedException.class) public void wrongPass() throws UnauthorizedException, ConnectionException, InternalUnauthenticatedException, ClassNotFoundException, IllegalAccessException, InstantiationException { final KuneAuthProvider auth = new KuneAuthProvider(); auth.authenticate("admin", "easyeasy2"); }
@Test(expected = UnauthorizedException.class) public void wrongSession() throws UnauthorizedException, ConnectionException, InternalUnauthenticatedException, ClassNotFoundException, IllegalAccessException, InstantiationException { final KuneAuthProvider auth = new KuneAuthProvider(); auth.authenticate("admin", "6rzonw7n39p01td1p0rfujvu3"); }