org.apache.shindig.gadgets.servlet
Class OAuthCallbackServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.shindig.common.servlet.InjectedServlet
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
|
Method Summary |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
void |
setStateCrypter(BlobCrypter stateCrypter)
|
| 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 |
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
OAuthCallbackServlet
public OAuthCallbackServlet()
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.