[Dive4elements-commits] [PATCH 15 of 21] Move User class from was to saml sub-package

Wald Commits scm-commit at wald.intevation.org
Wed May 8 18:08:25 CEST 2013


# HG changeset patch
# User Bernhard Herzog <bh at intevation.de>
# Date 1368028574 -7200
# Node ID 0b092a1d136b5b22b700fcbd5c2831849b0bac19
# Parent  2f176892971fbe0bec5a83509430c9401531a7de
Move User class from was to saml sub-package.

diff -r 2f176892971f -r 0b092a1d136b gwt-client/src/main/java/org/dive4elements/river/client/server/auth/saml/User.java
--- /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:
diff -r 2f176892971f -r 0b092a1d136b gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Response.java
--- 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;
 
diff -r 2f176892971f -r 0b092a1d136b gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/User.java
--- 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:


More information about the Dive4elements-commits mailing list