Mercurial > dive4elements > river
changeset 2966:d115f719f0c0
Derive was User class from new DefaultUser class
flys-client/trunk@4962 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 13 Jul 2012 06:30:33 +0000 (2012-07-13) |
parents | 1fb12b05c859 |
children | ce07c6a1e96b |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/server/auth/was/User.java |
diffstat | 2 files changed, 23 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Thu Jul 12 13:40:47 2012 +0000 +++ b/flys-client/ChangeLog Fri Jul 13 06:30:33 2012 +0000 @@ -1,3 +1,9 @@ +2012-07-13 Bj�rn Ricks <bjoern.ricks@intevation.de> + + * src/main/java/de/intevation/fly/client/server/auth/was/User.java: + Derive User class from new + de.intevation.fly.client.server.auth.DefaultUser class. + 2012-07-12 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/webapp/WEB-INF/web.xml: Set artifact server port back to 8181
--- a/flys-client/src/main/java/de/intevation/flys/client/server/auth/was/User.java Thu Jul 12 13:40:47 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/auth/was/User.java Fri Jul 13 06:30:33 2012 +0000 @@ -1,22 +1,28 @@ package de.intevation.flys.client.server.auth.was; -import de.intevation.flys.client.shared.model.DefaultUser; - -public class User extends DefaultUser implements de.intevation.flys.client.server.auth.User { +import java.util.Date; - private String password; +import de.intevation.flys.client.server.auth.DefaultUser; - public User(String name, String password) { - this.setName(name); +public class User +extends DefaultUser +implements de.intevation.flys.client.server.auth.User { + + private Assertion assertion; + + public User(String name, String password, Assertion assertion) { + this.name = name; this.password = password; + this.assertion = assertion; } - public String getPassword() { - return this.password; - } - + @Override public boolean hasExpired() { - //TODO + Date until = this.assertion.getUntil(); + if (until != null) { + Date current = new Date(); + return !current.after(until); + } return false; } }