/** * Gets a the value of the parameter with the specified name. * * @param name The name of the parameter, * without the openid.<extension_alias> prefix. * @return The parameter value, or null if not found. */ protected Parameter getParameter(String name) { return _parameters.getParameter(name); }
/** * Returns a map with the requested attributes. * * @param required If set to true the list of 'required' attributes * is returned, otherwise the list of 'if_available' * attributes. * @return Map of attribute aliases -> attribute type URIs. */ public Map getAttributes(boolean required) { HashMap attributes = new LinkedHashMap(); String level = required ? "required" : "if_available"; Parameter param = _parameters.getParameter(level); if (param != null) { String[] values = param.getValue().split(","); for (int i = 0; i < values.length; i++) { String alias = values[i]; attributes.put(alias, _parameters.getParameterValue("type." + alias)); } } return attributes; }
/** * Gets a the value of the parameter with the specified name. * * @param name The name of the parameter, * without the openid.<extension_alias> prefix. * @return The parameter value, or null if not found. */ protected Parameter getParameter(String name) { return _parameters.getParameter(name); }
/** * Gets a the value of the parameter with the specified name. * * @param name The name of the parameter, * without the openid.<extension_alias> prefix. * @return The parameter value, or null if not found. */ protected Parameter getParameter(String name) { return _parameters.getParameter(name); }
protected Parameter getParameter(String name) { return _params.getParameter(name); }
/** * Gets a the value of the parameter with the specified name. * * @param name The name of the parameter, * without the openid.<extension_alias> prefix. * @return The parameter value, or null if not found. */ protected Parameter getParameter(String name) { return _parameters.getParameter(name); }
/** * Gets a the value of the parameter with the specified name. * * @param name The name of the parameter, * without the openid.<extension_alias> prefix. * @return The parameter value, or null if not found. */ protected Parameter getParameter(String name) { return _parameters.getParameter(name); }
protected Parameter getParameter(String name) { return _params.getParameter(name); }
protected Parameter getParameter(String name) { return _params.getParameter(name); }
protected Parameter getParameter(String name) { return _params.getParameter(name); }
protected Parameter getParameter(String name) { return _params.getParameter(name); }
public String getParameterValue(String name) { Parameter param = getParameter(name); return param != null ? param.getValue() : null; }
public String getParameterValue(String name) { Parameter param = getParameter(name); return param != null ? param.getValue() : null; }
public String getParameterValue(String name) { Parameter param = getParameter(name); return param != null ? param.getValue() : null; }
public String getParameterValue(String name) { Parameter param = getParameter(name); return param != null ? param.getValue() : null; }
public String getParameterValue(String name) { Parameter param = getParameter(name); return param != null ? param.getValue() : null; }
/** * Returns a map with the requested attributes. * * @param required If set to true the list of 'required' attributes * is returned, otherwise the list of 'optional' * attributes. * @return List of attribute names. */ public List getAttributes(boolean required) { List attributes = new ArrayList(); String level = required ? "required" : "optional"; Parameter param = _parameters.getParameter(level); if (param != null) { String[] values = param.getValue().split(","); for (int i = 0; i < values.length; i++) { String attr = multivalDecode(values[i]); attributes.add(attr); } } return attributes; }
/** * Returns a map with the requested attributes. * * @param required If set to true the list of 'required' attributes * is returned, otherwise the list of 'optional' * attributes. * @return List of attribute names. */ public List getAttributes(boolean required) { List attributes = new ArrayList(); String level = required ? "required" : "optional"; Parameter param = _parameters.getParameter(level); if (param != null) { String[] values = param.getValue().split(","); for (int i = 0; i < values.length; i++) { String attr = multivalDecode(values[i]); attributes.add(attr); } } return attributes; }
/** * Returns a map with the requested attributes. * * @param required If set to true the list of 'required' attributes * is returned, otherwise the list of 'optional' * attributes. * @return List of attribute names. */ public List getAttributes(boolean required) { List attributes = new ArrayList(); String level = required ? "required" : "optional"; Parameter param = _parameters.getParameter(level); if (param != null) { String[] values = param.getValue().split(","); for (int i = 0; i < values.length; i++) { String attr = multivalDecode(values[i]); attributes.add(attr); } } return attributes; }
/** * Adds an attribute to the SReg request. * * @param attr A requested attribute name. * @param required If true, marks the attribute as 'required'; * 'if_available' otherwise. */ public void addAttribute(String attr, boolean required) { String level = required ? "required" : "optional"; Parameter levelParam = _parameters.getParameter(level); Parameter newParam; if (levelParam == null) { newParam = new Parameter(level, multivalEncode(attr)); } else { newParam = new Parameter(level, levelParam.getValue() + "," + multivalEncode(attr)); _parameters.removeParameters(level); } _parameters.set(newParam); if (DEBUG) _log.debug("Added new attribute to SReg request: " + attr + " required: " + required); }