Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/auth/was/User.java @ 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 |
parents | 5ba0a6efdf3b |
children | 98514ab2c9ba |
comparison
equal
deleted
inserted
replaced
2965:1fb12b05c859 | 2966:d115f719f0c0 |
---|---|
1 package de.intevation.flys.client.server.auth.was; | 1 package de.intevation.flys.client.server.auth.was; |
2 | 2 |
3 import de.intevation.flys.client.shared.model.DefaultUser; | 3 import java.util.Date; |
4 | 4 |
5 public class User extends DefaultUser implements de.intevation.flys.client.server.auth.User { | 5 import de.intevation.flys.client.server.auth.DefaultUser; |
6 | 6 |
7 private String password; | 7 public class User |
8 extends DefaultUser | |
9 implements de.intevation.flys.client.server.auth.User { | |
8 | 10 |
9 public User(String name, String password) { | 11 private Assertion assertion; |
10 this.setName(name); | 12 |
13 public User(String name, String password, Assertion assertion) { | |
14 this.name = name; | |
11 this.password = password; | 15 this.password = password; |
16 this.assertion = assertion; | |
12 } | 17 } |
13 | 18 |
14 public String getPassword() { | 19 @Override |
15 return this.password; | |
16 } | |
17 | |
18 public boolean hasExpired() { | 20 public boolean hasExpired() { |
19 //TODO | 21 Date until = this.assertion.getUntil(); |
22 if (until != null) { | |
23 Date current = new Date(); | |
24 return !current.after(until); | |
25 } | |
20 return false; | 26 return false; |
21 } | 27 } |
22 } | 28 } |
23 | 29 |
24 // vim:set ts=4 sw=4 si et fenc=utf8 tw=80: | 30 // vim:set ts=4 sw=4 si et fenc=utf8 tw=80: |