|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.resteasy.auth.oauth.OAuthUtils
public class OAuthUtils
Field Summary | |
---|---|
static java.lang.String |
AUTHENTICATE_HEADER
HTTP WWW-Authenticate header |
static java.lang.String |
AUTHORIZATION_HEADER
HTTP Authorization header |
static java.lang.String |
OAUTH_CALLBACK_CONFIRMED_PARAM
OAuth Callback Confirmed parameter |
static java.lang.String |
OAUTH_VERIFIER_PARAM
OAuth Verifier parameter |
Constructor Summary | |
---|---|
OAuthUtils()
|
Method Summary | |
---|---|
static java.lang.String |
encodeForOAuth(java.lang.String value)
Encodes the given value for use in an OAuth parameter |
static int |
getHttpCode(net.oauth.OAuthProblemException x)
Finds the HTTP status code from the given exception |
static OAuthProvider |
getOAuthProvider(javax.servlet.ServletContext context)
Loads the OAuthProvider as specified in the Servlet Context parameters, and caches it in the Servlet Context attributes for reuse. |
static OAuthValidator |
getValidator(javax.servlet.ServletContext context,
OAuthProvider provider)
Creates an OAuthValidator, and caches it in the Servlet Context attributes for reuse. |
static void |
makeErrorResponse(javax.servlet.http.HttpServletResponse resp,
java.lang.String message,
int httpCode,
OAuthProvider provider)
Sends an error to the OAuth Consumer |
static long |
parseTimestamp(java.lang.String timestampString)
Parse an OAuth timestamp |
static net.oauth.OAuthMessage |
readMessage(javax.servlet.http.HttpServletRequest req)
Reads an OAuthMessage from an HTTP Servlet Request. |
static void |
sendValues(javax.servlet.http.HttpServletResponse resp,
java.lang.String... params)
Sends a list of OAuth parameters in the body of the given Http Servlet Response |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String AUTHORIZATION_HEADER
public static final java.lang.String AUTHENTICATE_HEADER
public static final java.lang.String OAUTH_VERIFIER_PARAM
public static final java.lang.String OAUTH_CALLBACK_CONFIRMED_PARAM
Constructor Detail |
---|
public OAuthUtils()
Method Detail |
---|
public static java.lang.String encodeForOAuth(java.lang.String value)
public static void sendValues(javax.servlet.http.HttpServletResponse resp, java.lang.String... params) throws java.io.IOException
params
- a list of java.io.IOException
public static net.oauth.OAuthMessage readMessage(javax.servlet.http.HttpServletRequest req)
public static void makeErrorResponse(javax.servlet.http.HttpServletResponse resp, java.lang.String message, int httpCode, OAuthProvider provider) throws java.io.IOException
java.io.IOException
public static long parseTimestamp(java.lang.String timestampString) throws OAuthException
OAuthException
public static int getHttpCode(net.oauth.OAuthProblemException x)
public static OAuthProvider getOAuthProvider(javax.servlet.ServletContext context) throws javax.servlet.ServletException
javax.servlet.ServletException
public static OAuthValidator getValidator(javax.servlet.ServletContext context, OAuthProvider provider)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |