100101102103104105106107108109110
user4.put(SRPRegistry.MD_NAME_FIELD, Registry.SHA_HASH); Map credentials; try { credentials = authenticator.lookup(user1); harness.fail("lookup(user1)"); } catch (AuthenticationException x) { harness.check(true, "lookup(user1)");
110111112113114115116117118119120
harness.check(true, "lookup(user1)"); } try { credentials = authenticator.lookup(user2); harness.fail("lookup(user2)"); } catch (AuthenticationException x) { harness.check(true, "lookup(user2)");
120121122123124125126127128129130
harness.check(true, "lookup(user2)"); } try { credentials = authenticator.lookup(user3); harness.fail("lookup(user3)"); } catch (AuthenticationException x) { harness.check(true, "lookup(user3)");
130131132133134135136137138139140
harness.check(true, "lookup(user3)"); } try { credentials = authenticator.lookup(user4); harness.fail("lookup(user4)"); } catch (AuthenticationException x) { harness.check(true, "lookup(user4)");
178179180181182183184185186187188
// ---------------------------------------------------------------------- String saltString; try { credentials = authenticator.lookup(user1); saltString = (String) credentials.get(SRPRegistry.SALT_FIELD); harness.check(saltString.equals(user1.get(SRPRegistry.SALT_FIELD)), "user1 OK"); } catch (AuthenticationException x)
190191192193194195196197198199200
harness.fail("update(user1)"); } try { credentials = authenticator.lookup(user2); saltString = (String) credentials.get(SRPRegistry.SALT_FIELD); harness.check(saltString.equals(user2.get(SRPRegistry.SALT_FIELD)), "user2 OK"); } catch (AuthenticationException x)
202203204205206207208209210211212
harness.fail("update(user2)"); } try { credentials = authenticator.lookup(user3); saltString = (String) credentials.get(SRPRegistry.SALT_FIELD); harness.check(saltString.equals(user3.get(SRPRegistry.SALT_FIELD)), "user3 OK"); } catch (AuthenticationException x)
251252253254255256257258259260261
harness.fail("activate()"); } try { credentials = authenticator.lookup(user4); saltString = (String) credentials.get(SRPRegistry.SALT_FIELD); harness.check(saltString.equals(user4.get(SRPRegistry.SALT_FIELD))); } catch (AuthenticationException x) {