org.apache.shindig.social.core.oauth
Class OAuthAuthenticationHandler
java.lang.Object
org.apache.shindig.social.core.oauth.OAuthAuthenticationHandler
- All Implemented Interfaces:
- AuthenticationHandler
public class OAuthAuthenticationHandler
- extends Object
- implements AuthenticationHandler
Handle both 2-legged consumer and full 3-legged OAuth requests.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REQUESTOR_ID_PARAM
public static final String REQUESTOR_ID_PARAM
- See Also:
- Constant Field Values
OAuthAuthenticationHandler
@Inject
public OAuthAuthenticationHandler(OAuthDataStore store)
getName
public String getName()
- Specified by:
getName in interface AuthenticationHandler
getWWWAuthenticateHeader
public String getWWWAuthenticateHeader(String realm)
- Specified by:
getWWWAuthenticateHeader in interface AuthenticationHandler
getSecurityTokenFromRequest
public SecurityToken getSecurityTokenFromRequest(javax.servlet.http.HttpServletRequest request)
throws AuthenticationHandler.InvalidAuthenticationException
- Specified by:
getSecurityTokenFromRequest in interface AuthenticationHandler
- Throws:
AuthenticationHandler.InvalidAuthenticationException
verifyMessage
protected SecurityToken verifyMessage(net.oauth.OAuthMessage message)
throws net.oauth.OAuthProblemException
- Throws:
net.oauth.OAuthProblemException
getOAuthEntry
protected OAuthEntry getOAuthEntry(net.oauth.OAuthMessage message)
throws net.oauth.OAuthProblemException
- Throws:
net.oauth.OAuthProblemException
getConsumer
protected net.oauth.OAuthConsumer getConsumer(net.oauth.OAuthMessage message)
throws net.oauth.OAuthProblemException
- Throws:
net.oauth.OAuthProblemException
getTokenFromVerifiedRequest
protected SecurityToken getTokenFromVerifiedRequest(net.oauth.OAuthMessage message,
OAuthEntry entry,
net.oauth.OAuthConsumer authConsumer)
throws net.oauth.OAuthProblemException
- Throws:
net.oauth.OAuthProblemException
readBody
public static byte[] readBody(javax.servlet.http.HttpServletRequest request)
throws IOException
- Throws:
IOException
readBodyString
public static String readBodyString(javax.servlet.http.HttpServletRequest request)
throws IOException
- Throws:
IOException
verifyBodyHash
public static void verifyBodyHash(javax.servlet.http.HttpServletRequest request,
String oauthBodyHash)
throws AuthenticationHandler.InvalidAuthenticationException
- Throws:
AuthenticationHandler.InvalidAuthenticationException
getParameter
public static String getParameter(net.oauth.OAuthMessage requestMessage,
String key)
Copyright © 2007-2012. All Rights Reserved.