Class ClientCredentialsHandler
- java.lang.Object
-
- org.apache.synapse.endpoints.auth.oauth.OAuthHandler
-
- org.apache.synapse.endpoints.auth.oauth.ClientCredentialsHandler
-
- All Implemented Interfaces:
AuthHandler
public class ClientCredentialsHandler extends OAuthHandler
This class is used to handle Client Credentials grant oauth.
-
-
Field Summary
-
Fields inherited from class org.apache.synapse.endpoints.auth.oauth.OAuthHandler
connectionRequestTimeout, connectionTimeout, socketTimeout
-
-
Constructor Summary
Constructors Constructor Description ClientCredentialsHandler(String tokenApiUrl, String clientId, String clientSecret, String authMode, int connectionTimeout, int connectionRequestTimeout, int socketTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
buildTokenRequestPayload(MessageContext messageContext)
Return the request payload relevant to the OAuth handler.protected int
getHash(MessageContext messageContext)
protected org.apache.axiom.om.OMElement
serializeSpecificOAuthConfigs(org.apache.axiom.om.OMFactory omFactory)
Return the OMElement for OAuth configuration relevant to the OAuth handler.-
Methods inherited from class org.apache.synapse.endpoints.auth.oauth.OAuthHandler
getAuthMode, getAuthType, getClientId, getClientSecret, getConnectionRequestTimeout, getConnectionTimeout, getCustomHeadersMap, getEncodedCredentials, getRequestParametersAsString, getRequestParametersMap, getResolvedCustomHeadersMap, getSocketTimeout, getTokenUrl, removeTokenFromCache, removeTokensFromCache, serializeOAuthConfiguration, setAuthHeader, setCustomHeaders, setRequestParameters
-
-
-
-
Method Detail
-
buildTokenRequestPayload
protected String buildTokenRequestPayload(MessageContext messageContext) throws AuthException
Description copied from class:OAuthHandler
Return the request payload relevant to the OAuth handler.- Specified by:
buildTokenRequestPayload
in classOAuthHandler
- Returns:
- String payload
- Throws:
AuthException
-
serializeSpecificOAuthConfigs
protected org.apache.axiom.om.OMElement serializeSpecificOAuthConfigs(org.apache.axiom.om.OMFactory omFactory)
Description copied from class:OAuthHandler
Return the OMElement for OAuth configuration relevant to the OAuth handler.- Specified by:
serializeSpecificOAuthConfigs
in classOAuthHandler
- Returns:
- OMElement OAuth configuration
-
getHash
protected int getHash(MessageContext messageContext) throws AuthException
- Specified by:
getHash
in classOAuthHandler
- Throws:
AuthException
-
-