org.apache.shindig.gadgets.servlet
Class OAuthCallbackServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.shindig.common.servlet.InjectedServlet
              extended by org.apache.shindig.gadgets.servlet.OAuthCallbackServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class OAuthCallbackServlet
extends InjectedServlet

Servlet to act as our OAuth callback URL. When gadget authors register a consumer key with an OAuth service provider, they can provide a URL pointing to this servlet as their callback URL. Protocol flow: - gadget discovers it needs approval to access data at OAuth SP. - gadget opens popup window to approval URL, passing URL to this servlet as the oauth_callback parameter on the approval URL. - user grants approval at service provider - service provider redirects to this servlet - this servlet closes the window - gadget discovers the window has closed and automatically fetches the user's data.

See Also:
Serialized Form

Field Summary
static String CALLBACK_STATE_PARAM
           
static String REAL_DOMAIN_PARAM
           
 
Fields inherited from class org.apache.shindig.common.servlet.InjectedServlet
initialized, injector
 
Constructor Summary
OAuthCallbackServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void setStateCrypter(BlobCrypter stateCrypter)
           
 
Methods inherited from class org.apache.shindig.common.servlet.InjectedServlet
checkInitialized, init
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CALLBACK_STATE_PARAM

public static final String CALLBACK_STATE_PARAM
See Also:
Constant Field Values

REAL_DOMAIN_PARAM

public static final String REAL_DOMAIN_PARAM
See Also:
Constant Field Values
Constructor Detail

OAuthCallbackServlet

public OAuthCallbackServlet()
Method Detail

setStateCrypter

@Inject
public void setStateCrypter(BlobCrypter stateCrypter)

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
IOException


Copyright © 2007-2012. All Rights Reserved.