Elie
Elie

Reputation: 1

WSO2 OAuth Validation Error between Identity Server and Integration Studio

We are attempting to use the OAuth Mediator in Integration Studio to validate a token with the WSO2 Identity Server.

The token we are using is valid on the Identity Server because testing through SOAP UI returns a valid response. However, we are unable to do so using the OAuth Mediator in Integration Studio. We are using a password grant type.

When we attempt to pass the call through the OAuth mediator we receive the below errors:

WARN {org.apache.synapse.FaultHandler} - ERROR_EXCEPTION : org.apache.synapse.SynapseException: Error **occured while validating** oauth 2.0 access token

WARN {API_LOGGER.UserInfoRestAPI} - ERROR_CODE : 0 *ERROR_MESSAGE : Error occured while validating oauth 2.0 access token*

WARN {org.apache.synapse.FaultHandler} - FaultHandler : org.apache.synapse.mediators.MediatorFaultHandler@1f7c8500

WARN {org.apache.synapse.mediators.MediatorFaultHandler} - Executing fault handler mediator : org.apache.synapse.mediators.base.SequenceMediator

WARN {API_LOGGER.UserInfoRestAPI} - Executing fault sequence mediator : org.apache.synapse.mediators.base.SequenceMediator

For reference, we are using this documentation.

Calling the web service through SOAP UI returns successfully as shown here:

Information about the setup:

Upvotes: 0

Views: 220

Answers (1)

Marwan
Marwan

Reputation: 11

WSO2 EI 7.0.2 and even 6.6 are using org.wso2.carbon.identity.oauth.stub_6.1.0 containing oauth stub classes that are not compatible with WSO2 Identity Server 5.10. So what you need to do is:

  • Copy org.wso2.carbon.identity.oauth.stub_6.4.2,jar from WSO2 Identity Server to the wso2\components\plugins folder of the WSO2 EI 6.6 or 7.X
  • Update wso2\components\default\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info replacing the old entry with the new updated one. org.wso2.carbon.identity.oauth.stub,6.4.2,../plugins/org.wso2.carbon.identity.oauth.stub_6.4.2.jar,4,true Restart.

The error should go away. However, this is not a very clean solution and maybe WSO2 should release a fix updating the WSO2 OAuth Mediator java classes.

Upvotes: 1

Related Questions