Implemented getAttributes and setAttributes to satisfy
Attributes interface addition
package org.apache.guacamole.auth.jdbc.user;
+import java.util.HashMap;
+import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
@@ -67,6 +69,21 @@ public abstract class RemoteAuthenticatedUser implements AuthenticatedUser {
*/
private static final Pattern X_FORWARDED_FOR = Pattern.compile("^" + IP_ADDRESS_REGEX + "(, " + IP_ADDRESS_REGEX + ")*$");
+ /**
+ * Arbitrary attributes associated with this RemoteAuthenticatedUser object.
+ */
+ private Map<String, String> attributes = new HashMap<String, String>();
+
+ @Override
+ public Map<String, String> getAttributes() {
+ return attributes;
+ }
+
+ @Override
+ public void setAttributes(Map<String, String> attributes) {
+ this.attributes = attributes;
+ }
+
/**
* Derives the remote host of the authenticating user from the given
* credentials object. The remote host is derived from X-Forwarded-For
