bjoern@2956: package de.intevation.flys.client.server.auth.was; bjoern@2956: bjoern@2966: import java.util.Date; bjoern@2978: import java.util.List; bjoern@2956: bjoern@2966: import de.intevation.flys.client.server.auth.DefaultUser; bjoern@2956: bjoern@2966: public class User bjoern@2966: extends DefaultUser bjoern@2966: implements de.intevation.flys.client.server.auth.User { bjoern@2966: bjoern@2966: private Assertion assertion; bjoern@2966: bjoern@3486: public User(String name, bjoern@3486: String password, bjoern@3504: String account, bjoern@3486: List roles, bjoern@3486: Assertion assertion, bjoern@3486: List features bjoern@3486: ) { bjoern@2978: this.setName(name); bjoern@2978: this.setPassword(password); bjoern@2978: this.setRoles(roles); bjoern@2966: this.assertion = assertion; bjoern@3486: this.setAllowedFeatures(features); bjoern@3504: this.setAccount(account); bjoern@2956: } bjoern@2956: bjoern@2966: @Override sascha@2959: public boolean hasExpired() { bjoern@2966: Date until = this.assertion.getUntil(); bjoern@2966: if (until != null) { bjoern@2966: Date current = new Date(); bjoern@2966: return !current.after(until); bjoern@2966: } bjoern@2956: return false; bjoern@2956: } bjoern@2956: } bjoern@2956: bjoern@2956: // vim:set ts=4 sw=4 si et fenc=utf8 tw=80: