com.google.api.client.auth.oauth2
Class AccessProtectedResource

java.lang.Object
  extended by com.google.api.client.auth.oauth2.AccessProtectedResource

Deprecated. (scheduled to be removed in 1.5) Use AccessProtectedResource

@Deprecated
public final class AccessProtectedResource
extends Object

OAuth 2.0 methods for specifying the access token parameter as specified in Accessing a Protected Resource.

Since:
1.2
Author:
Yaniv Inbar

Method Summary
static void usingAuthorizationHeader(HttpTransport transport, String accessToken)
          Deprecated. Sets the "Authorization" header using the given access token for every executed HTTP request for the given HTTP transport.
static void usingFormEncodedBody(HttpTransport transport, String accessToken)
          Deprecated. Sets the "oauth_token" parameter in the form-encoded HTTP body using the given access token for every executed HTTP request for the given HTTP transport.
static void usingQueryParameter(HttpTransport transport, String accessToken)
          Deprecated. Sets the "oauth_token" URI query parameter using the given access token for every executed HTTP request for the given HTTP transport.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

usingAuthorizationHeader

public static void usingAuthorizationHeader(HttpTransport transport,
                                            String accessToken)
Deprecated. 
Sets the "Authorization" header using the given access token for every executed HTTP request for the given HTTP transport.

Any existing HTTP request execute intercepters for setting the OAuth 2 access token will be removed.

Parameters:
transport - HTTP transport
accessToken - access token

usingQueryParameter

public static void usingQueryParameter(HttpTransport transport,
                                       String accessToken)
Deprecated. 
Sets the "oauth_token" URI query parameter using the given access token for every executed HTTP request for the given HTTP transport.

Any existing HTTP request execute intercepters for setting the OAuth 2 access token will be removed.

Parameters:
transport - HTTP transport
accessToken - access token

usingFormEncodedBody

public static void usingFormEncodedBody(HttpTransport transport,
                                        String accessToken)
Deprecated. 
Sets the "oauth_token" parameter in the form-encoded HTTP body using the given access token for every executed HTTP request for the given HTTP transport.

Any existing HTTP request execute intercepters for setting the OAuth 2 access token will be removed. Requirements:

Parameters:
transport - HTTP transport
accessToken - access token


Copyright © 2010-2011 Google. All Rights Reserved.