org.apache.abdera.ext.gdata
Class GoogleLoginAuthCredentials

java.lang.Object
  extended by org.apache.abdera.ext.gdata.GoogleLoginAuthCredentials
All Implemented Interfaces:
org.apache.commons.httpclient.Credentials

public final class GoogleLoginAuthCredentials
extends Object
implements org.apache.commons.httpclient.Credentials

When using the GoogleLoginAuthScheme with the typical Commons AbderaClient UsernamePasswordCredentials, the AuthScheme implementation will request a new auth token from the Google server for every request. To make it a more efficient, clients can use GoogleLoginAuthCredentials which will perform the Google Auth once to get the auth token which will be reused for every request.

 GoogleLoginAuthScheme.register();
 
 AbderaClient client = new CommonsClient();
 
 GoogleLoginAuthCredentials credentials = new GoogleLoginAuthCredentials("email", "password", "blogger");
 client.addCredentials("http://beta.blogger.com", null, null, credentials);
 


Constructor Summary
GoogleLoginAuthCredentials(String auth)
           
GoogleLoginAuthCredentials(String id, String pwd, String service)
           
 
Method Summary
 String getAuth()
           
 String getService()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleLoginAuthCredentials

public GoogleLoginAuthCredentials(String auth)

GoogleLoginAuthCredentials

public GoogleLoginAuthCredentials(String id,
                                  String pwd,
                                  String service)
Method Detail

getAuth

public String getAuth()

getService

public String getService()


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.