webidor/src/main/java/cz/xelfi/quoridor/webidor/resources/Users.java
changeset 239 a47345ebbdd7
parent 189 6245e1b634aa
child 264 d60370059c3c
     1.1 --- a/webidor/src/main/java/cz/xelfi/quoridor/webidor/resources/Users.java	Mon Jan 11 10:16:57 2010 +0100
     1.2 +++ b/webidor/src/main/java/cz/xelfi/quoridor/webidor/resources/Users.java	Sun Apr 25 21:41:00 2010 +0200
     1.3 @@ -131,6 +131,14 @@
     1.4          return Response.ok().entity(getUserInfo(null, loginId, id).getJsonSource()).build();
     1.5      }
     1.6  
     1.7 +    final boolean verifyPassword(String id, String passwd) throws IOException {
     1.8 +        Properties p = getProp(id);
     1.9 +        if (p != null) {
    1.10 +            return passwd.equals(p.getProperty("passwd"));
    1.11 +        }
    1.12 +        return false;
    1.13 +    }
    1.14 +
    1.15      private synchronized Properties getProp(String id) throws FileNotFoundException, IOException {
    1.16          Properties p = new Properties();
    1.17          if (id != null && id.length() > 0) {