GUACAMOLE-524: Implemented getAttributes and setAttributes to satisfy

Attributes interface addition
This commit is contained in:
Jared Frees
2018-06-12 11:33:14 -04:00
parent 3abc996658
commit 862ab91432

View File

@@ -19,6 +19,8 @@
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