protected Map<String, String> getParameterMap() throws IOException { beforeGetParameter(); if (parameterMap == null) { parameterMap = OAuth.newMap(parameters); } return parameterMap; }
/** * Construct a WWW-Authenticate or Authentication header value, containing the given realm plus * all the parameters whose names begin with "oauth_". */ public String getAuthorizationHeader(String realm) throws IOException { StringBuilder into = new StringBuilder(); if (realm != null) { into.append(" realm=\"").append(OAuth.percentEncode(realm)).append('"'); } else { into.append(" realm=\"\""); } beforeGetParameter(); if (parameters != null) { for (Map.Entry parameter : parameters) { String name = toString(parameter.getKey()); if (name.startsWith("oauth_")) { if (into.length() > 0) into.append(","); into.append(OAuth.percentEncode(name)).append("=\""); into.append(OAuth.percentEncode(toString(parameter.getValue()))).append('"'); } } } return AUTH_SCHEME + into.toString(); }
public List<Map.Entry<String, String>> getParameters() throws IOException { beforeGetParameter(); return Collections.unmodifiableList(parameters); }