public class OAuthUtils
extends java.lang.Object
Constructor and Description |
---|
OAuthUtils() |
Modifier and Type | Method and Description |
---|---|
static OAuthHandler |
getOAuthHandler(org.apache.axiom.om.OMElement httpElement)
This method will return an OAuthHandler instance depending on the oauth configs
|
static java.lang.String |
getRandomOAuthHandlerID()
Method to generate a random id for each OAuth handler
|
static boolean |
retryOnOAuthFailure(OAuthConfiguredHTTPEndpoint httpEndpoint,
MessageContext synapseInMsgCtx,
MessageContext synapseOutMsgCtx)
Method to check whether retry is needed
|
static void |
sendOAuthFault(MessageContext messageContext)
Send back the error to the client
|
public static OAuthHandler getOAuthHandler(org.apache.axiom.om.OMElement httpElement) throws OAuthException
httpElement
- Element containing http configsOAuthException
- throw exception for invalid oauth configspublic static java.lang.String getRandomOAuthHandlerID()
public static boolean retryOnOAuthFailure(OAuthConfiguredHTTPEndpoint httpEndpoint, MessageContext synapseInMsgCtx, MessageContext synapseOutMsgCtx)
httpEndpoint
- OAuth Configured HTTP Endpoint related to the message contextsynapseInMsgCtx
- MessageContext that has been receivedsynapseOutMsgCtx
- Corresponding outgoing Synapse MessageContext for the above received MessageContextpublic static void sendOAuthFault(MessageContext messageContext)
messageContext
- MessageContext of the requestCopyright © 2005-2021 Apache Software Foundation. All Rights Reserved.