/** * Returns the protection realm for the request. */ public String getRealm() { return get(REALM); }
/** * Returns the consumer key. */ public String getConsumerKey() { return get(CONSUMER_KEY); }
/** * Returns the timestamp, a value expected to be a positive integer, * typically containing the number of seconds since January 1, 1970 * 00:00:00 GMT (epoch). */ public String getTimestamp() { return get(TIMESTAMP); }
/** * Returns the signature for the request. */ public String getSignature() { return get(SIGNATURE); }
/** * Returns the callback URL. */ public String getCallback() { return get(CALLBACK); }
/** * Returns the signature method used to sign the request. */ public String getSignatureMethod() { return get(SIGNATURE_METHOD); }
/** * Returns the nonce, a value that should be unique for a given * timestamp. */ public String getNonce() { return get(NONCE); }
/** * Returns the verifier code. */ public String getVerifier() { return get(VERIFIER); }
/** * Returns the request or access token. */ public String getToken() { return get(TOKEN); }
/** * Returns the protocol version. */ public String getVersion() { return get(VERSION); }
/** * Writes the OAuth parameters to a request, as an Authorization header. * * @param request the request to write OAuth parameters to. * @return this parameters object. */ public OAuth1Parameters writeRequest(OAuth1Request request) { StringBuilder buf = new StringBuilder(SCHEME); boolean comma = false; for (String key : keySet()) { String value = get(key); if (value == null) { continue; } buf.append(comma ? ", " : " ").append(UriComponent.encode(key, UriComponent.Type.UNRESERVED)); buf.append("=\"").append(UriComponent.encode(value, UriComponent.Type.UNRESERVED)).append('"'); comma = true; } request.addHeaderValue(AUTHORIZATION_HEADER, buf.toString()); return this; }
final String value = params.get(key);
/** * Returns the protection realm for the request. */ public String getRealm() { return get(REALM); }
/** * Returns the consumer key. */ public String getConsumerKey() { return get(CONSUMER_KEY); }
/** * Returns the signature for the request. */ public String getSignature() { return get(SIGNATURE); }
/** * Returns the nonce, a value that should be unique for a given * timestamp. */ public String getNonce() { return get(NONCE); }
/** * Returns the callback URL. */ public String getCallback() { return get(CALLBACK); }
/** * Returns the protocol version. */ public String getVersion() { return get(VERSION); }
/** * Returns the verifier code. */ public String getVerifier() { return get(VERIFIER); }
/** * Returns the protocol version. */ public String getVersion() { return get(VERSION); }