Apache CXF API

org.apache.cxf.rs.security.oauth.utils
Class OAuthUtils

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth.utils.OAuthUtils

public final class OAuthUtils
extends Object

Various utility methods


Field Summary
static String REPORT_FAILURE_DETAILS
           
static String REPORT_FAILURE_DETAILS_AS_HEADER
           
 
Method Summary
static void addParametersIfNeeded(MessageContext mc, javax.servlet.http.HttpServletRequest request, net.oauth.OAuthMessage oAuthMessage)
           
static boolean checkRequestURI(String servletPath, String uri)
           
static OAuthDataProvider getOAuthDataProvider(OAuthDataProvider provider, javax.servlet.ServletContext servletContext)
           
static OAuthDataProvider getOAuthDataProvider(javax.servlet.ServletContext servletContext)
           
static net.oauth.OAuthMessage getOAuthMessage(MessageContext mc, javax.servlet.http.HttpServletRequest request, String[] requiredParams)
           
static net.oauth.OAuthValidator getOAuthValidator(javax.servlet.ServletContext servletContext)
           
static javax.ws.rs.core.Response handleException(MessageContext mc, Exception e, int status)
           
static RequestToken handleTokenRejectedException()
           
static Object instantiateClass(String className)
           
static List<String> parseParamValue(String paramValue, String defaultValue)
           
static void validateMessage(net.oauth.OAuthMessage oAuthMessage, Client client, Token token, OAuthDataProvider provider, net.oauth.OAuthValidator validator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPORT_FAILURE_DETAILS

public static final String REPORT_FAILURE_DETAILS
See Also:
Constant Field Values

REPORT_FAILURE_DETAILS_AS_HEADER

public static final String REPORT_FAILURE_DETAILS_AS_HEADER
See Also:
Constant Field Values
Method Detail

checkRequestURI

public static boolean checkRequestURI(String servletPath,
                                      String uri)

validateMessage

public static void validateMessage(net.oauth.OAuthMessage oAuthMessage,
                                   Client client,
                                   Token token,
                                   OAuthDataProvider provider,
                                   net.oauth.OAuthValidator validator)
                            throws Exception
Throws:
Exception

getOAuthMessage

public static net.oauth.OAuthMessage getOAuthMessage(MessageContext mc,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     String[] requiredParams)
                                              throws Exception
Throws:
Exception

addParametersIfNeeded

public static void addParametersIfNeeded(MessageContext mc,
                                         javax.servlet.http.HttpServletRequest request,
                                         net.oauth.OAuthMessage oAuthMessage)
                                  throws IOException
Throws:
IOException

handleException

public static javax.ws.rs.core.Response handleException(MessageContext mc,
                                                        Exception e,
                                                        int status)

parseParamValue

public static List<String> parseParamValue(String paramValue,
                                           String defaultValue)
                                    throws IOException
Throws:
IOException

handleTokenRejectedException

public static RequestToken handleTokenRejectedException()
                                                 throws net.oauth.OAuthProblemException
Throws:
net.oauth.OAuthProblemException

instantiateClass

public static Object instantiateClass(String className)
                               throws Exception
Throws:
Exception

getOAuthDataProvider

public static OAuthDataProvider getOAuthDataProvider(OAuthDataProvider provider,
                                                     javax.servlet.ServletContext servletContext)

getOAuthDataProvider

public static OAuthDataProvider getOAuthDataProvider(javax.servlet.ServletContext servletContext)

getOAuthValidator

public static net.oauth.OAuthValidator getOAuthValidator(javax.servlet.ServletContext servletContext)

Apache CXF API

Apache CXF