com.noelios.restlet.ext.oauth
Class OAuthHelper
java.lang.Object
com.noelios.restlet.authentication.AuthenticationHelper
com.noelios.restlet.ext.oauth.OAuthHelper
public class OAuthHelper
- extends AuthenticationHelper
Helper routines for OAuth.
- Author:
- Adam Rosien
Methods inherited from class com.noelios.restlet.authentication.AuthenticationHelper |
authenticate, challenge, format, format, getChallengeScheme, getLogger, isClientSide, isServerSide, parseRequest, setChallengeScheme, setClientSide, setServerSide |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OAuthHelper
public OAuthHelper()
- Constructor.
getMessage
public static net.oauth.OAuthMessage getMessage(Request request)
- Extract the parts of the given request that are relevant to OAuth.
Parameters include OAuth Authorization headers and the usual request
parameters in the query string and/or form encoded body. The header
parameters come first, followed by the rest in the order they came from
request.getParameterMap().
- Parameters:
request
-
- Returns:
- message
getParameters
public static java.util.List<net.oauth.OAuth.Parameter> getParameters(Request request)
- Translate request parameters into OAuth.Parameter objects.
- Parameters:
request
-
- Returns:
- parameters
formatCredentials
public void formatCredentials(java.lang.StringBuilder sb,
ChallengeResponse challenge,
Request request,
Series<Parameter> httpHeaders)
- Specified by:
formatCredentials
in class AuthenticationHelper
formatParameters
public void formatParameters(java.lang.StringBuilder sb,
Series<Parameter> parameters,
ChallengeRequest request)
- Overrides:
formatParameters
in class AuthenticationHelper
parseResponse
public void parseResponse(ChallengeResponse cr,
Request request)
- Overrides:
parseResponse
in class AuthenticationHelper
Copyright © 2005-2008 Noelios Technologies.