diff gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultUser.java @ 6188:733c32da04b8

Extend the shared interface User with the SAML ticket so that it can be communicated to the GWT client. Part of flys/issue1265
author Bernhard Herzog <bh@intevation.de>
date Tue, 04 Jun 2013 17:20:50 +0200
parents ea9eef426962
children
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultUser.java	Tue Jun 04 17:13:50 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultUser.java	Tue Jun 04 17:20:50 2013 +0200
@@ -22,6 +22,8 @@
     /** The name of the user.*/
     protected String name;
 
+    /** The saml ticket used for single sign-on.*/
+    protected String samlXML;
 
     /**
      * The default constructor.
@@ -36,9 +38,10 @@
      * @param identifier The uuid of the user.
      * @param name The name of the user.
      */
-    public DefaultUser(String identifier, String name) {
+    public DefaultUser(String identifier, String name, String samlXML) {
         this.identifier = identifier;
         this.name       = name;
+        this.samlXML    = samlXML;
     }
 
 
@@ -63,6 +66,16 @@
 
 
     /**
+     * Returns the SAML ticket for single sign-on.
+     *
+     * @return the SAML ticket as base64 encoded XML
+     */
+    public String getSamlXMLBase64() {
+        return samlXML;
+    }
+
+
+    /**
      * Set the identifier of the user.
      *
      * @param identifier The new identifier.
@@ -80,5 +93,14 @@
     public void setName(String name) {
         this.name = name;
     }
+
+    /**
+     * Set the SAML Ticket for single sign-on.
+     *
+     * @param samlXML the SAML ticket as base64 encoded XML.
+     */
+    public void setSamlXMLBase64(String samlXML) {
+        this.samlXML = samlXML;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org