changeset 5947:0b092a1d136b

Move User class from was to saml sub-package.
author Bernhard Herzog <bh@intevation.de>
date Wed, 08 May 2013 17:56:14 +0200
parents 2f176892971f
children d7b9b3e3c61a
files gwt-client/src/main/java/org/dive4elements/river/client/server/auth/saml/User.java gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Response.java gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/User.java
diffstat 3 files changed, 50 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/saml/User.java	Wed May 08 17:56:14 2013 +0200
@@ -0,0 +1,49 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3) 
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details. 
+ */
+
+package org.dive4elements.river.client.server.auth.saml;
+
+import java.util.Date;
+import java.util.List;
+
+import org.dive4elements.river.client.server.auth.DefaultUser;
+import org.dive4elements.river.client.server.auth.saml.Assertion;
+
+public class User
+extends DefaultUser
+implements org.dive4elements.river.client.server.auth.User {
+
+    private Assertion assertion;
+
+    public User(String name,
+        String       password,
+        String       account,
+        List<String> roles,
+        Assertion    assertion,
+        List<String> features
+    ) {
+        this.setName(name);
+        this.setPassword(password);
+        this.setRoles(roles);
+        this.assertion = assertion;
+        this.setAllowedFeatures(features);
+        this.setAccount(account);
+    }
+
+    @Override
+    public boolean hasExpired() {
+        Date until = this.assertion.getUntil();
+        if (until != null) {
+            Date current = new Date();
+            return !current.after(until);
+        }
+        return false;
+    }
+}
+
+// vim:set ts=4 sw=4 si et fenc=utf8 tw=80:
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Response.java	Wed May 08 17:56:14 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Response.java	Wed May 08 17:56:14 2013 +0200
@@ -27,6 +27,7 @@
 import org.dive4elements.river.client.server.auth.saml.Assertion;
 import org.dive4elements.river.client.server.auth.saml.XPathUtils;
 import org.dive4elements.river.client.server.auth.saml.TicketValidator;
+import org.dive4elements.river.client.server.auth.saml.User;
 
 import org.dive4elements.river.client.server.features.Features;
 
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/User.java	Wed May 08 17:56:14 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
- * Software engineering by Intevation GmbH
- *
- * This file is Free Software under the GNU AGPL (>=v3) 
- * and comes with ABSOLUTELY NO WARRANTY! Check out the
- * documentation coming with Dive4Elements River for details. 
- */
-
-package org.dive4elements.river.client.server.auth.was;
-
-import java.util.Date;
-import java.util.List;
-
-import org.dive4elements.river.client.server.auth.DefaultUser;
-import org.dive4elements.river.client.server.auth.saml.Assertion;
-
-public class User
-extends DefaultUser
-implements org.dive4elements.river.client.server.auth.User {
-
-    private Assertion assertion;
-
-    public User(String name,
-        String       password,
-        String       account,
-        List<String> roles,
-        Assertion    assertion,
-        List<String> features
-    ) {
-        this.setName(name);
-        this.setPassword(password);
-        this.setRoles(roles);
-        this.assertion = assertion;
-        this.setAllowedFeatures(features);
-        this.setAccount(account);
-    }
-
-    @Override
-    public boolean hasExpired() {
-        Date until = this.assertion.getUntil();
-        if (until != null) {
-            Date current = new Date();
-            return !current.after(until);
-        }
-        return false;
-    }
-}
-
-// vim:set ts=4 sw=4 si et fenc=utf8 tw=80:

http://dive4elements.wald.intevation.org