public class OAuthParameters extends Object implements com.google.api.client.http.HttpExecuteInterceptor, com.google.api.client.http.HttpRequestInitializer
| Modifier and Type | Field and Description |
|---|---|
String |
appFirewallHostname
The hostname used for communicating through the application firewall.
|
String |
appFirewallUrlPrefix
The prefix the application firewall uses to identify mappings for it's own URL rewriting.
|
String |
callback
Absolute URI back to which the server will redirect the resource owner when the Resource Owner
Authorization step is completed.
|
String |
consumerKey
Required identifier portion of the client credentials (equivalent to a username).
|
String |
nonce
Required nonce value.
|
String |
realm
Realm.
|
String |
sessionHandle
Session handle.
|
String |
signature
Signature.
|
String |
signatureMethod
Name of the signature method used by the client to sign the request.
|
com.google.api.client.auth.oauth.OAuthSigner |
signer
Required OAuth signature algorithm.
|
String |
timestamp
Required timestamp value.
|
String |
token
Token value used to associate the request with the resource owner or
null if the
request is not associated with a resource owner. |
boolean |
usingAppFirewall
A value of true indicates that server is sitting behind and application firewall (e.g.
|
String |
verifier
The verification code received from the server.
|
String |
version
Must either be "1.0" or
null to skip. |
| Constructor and Description |
|---|
OAuthParameters() |
| Modifier and Type | Method and Description |
|---|---|
void |
computeNonce()
Computes a nonce based on the hex string of a random non-negative long, setting the value of
the
nonce field. |
void |
computeSignature(String requestMethod,
com.google.api.client.http.GenericUrl requestUrl)
Computes a new signature based on the fields and the given request method and URL, setting the
values of the
signature and signatureMethod fields. |
void |
computeTimestamp()
Computes a timestamp based on the current system time, setting the value of the
timestamp field. |
static String |
escape(String value)
Returns the escaped form of the given value using OAuth escaping rules.
|
String |
getAuthorizationHeader()
Returns the
Authorization header value to use with the OAuth parameter values found in
the fields. |
void |
initialize(com.google.api.client.http.HttpRequest request) |
void |
intercept(org.apache.http.client.methods.HttpDelete request,
com.google.api.client.http.GenericUrl url) |
void |
intercept(org.apache.http.client.methods.HttpGet request,
com.google.api.client.http.GenericUrl url) |
void |
intercept(org.apache.http.client.methods.HttpPost request,
com.google.api.client.http.GenericUrl url) |
void |
intercept(org.apache.http.client.methods.HttpPut request,
com.google.api.client.http.GenericUrl url) |
void |
intercept(com.google.api.client.http.HttpRequest request) |
public com.google.api.client.auth.oauth.OAuthSigner signer
public String callback
public String consumerKey
public String nonce
computeNonce().public String realm
public String signature
computeSignature(java.lang.String, com.google.api.client.http.GenericUrl).public String signatureMethod
computeSignature(java.lang.String, com.google.api.client.http.GenericUrl).public String timestamp
computeTimestamp().public String token
null if the
request is not associated with a resource owner.public String sessionHandle
public String verifier
public String version
null to skip. Provides the version of the authentication
process as defined in this specification.public boolean usingAppFirewall
public String appFirewallHostname
public String appFirewallUrlPrefix
public void computeNonce()
nonce field.public void computeTimestamp()
timestamp field.public void computeSignature(String requestMethod, com.google.api.client.http.GenericUrl requestUrl) throws GeneralSecurityException
signature and signatureMethod fields.requestUrl - The full URL including paramtersrequestMethod - The REST verb GET, PUT, POST, DELETEGeneralSecurityException - general security exceptionpublic String getAuthorizationHeader()
Authorization header value to use with the OAuth parameter values found in
the fields.public static String escape(String value)
value - The string value you wish to escapepublic void initialize(com.google.api.client.http.HttpRequest request)
throws IOException
initialize in interface com.google.api.client.http.HttpRequestInitializerIOExceptionpublic void intercept(com.google.api.client.http.HttpRequest request)
throws IOException
intercept in interface com.google.api.client.http.HttpExecuteInterceptorIOExceptionpublic void intercept(org.apache.http.client.methods.HttpGet request,
com.google.api.client.http.GenericUrl url)
throws IOException
IOExceptionpublic void intercept(org.apache.http.client.methods.HttpPost request,
com.google.api.client.http.GenericUrl url)
throws IOException
IOExceptionpublic void intercept(org.apache.http.client.methods.HttpPut request,
com.google.api.client.http.GenericUrl url)
throws IOException
IOExceptionpublic void intercept(org.apache.http.client.methods.HttpDelete request,
com.google.api.client.http.GenericUrl url)
throws IOException
IOExceptionCopyright © 2018. All rights reserved.