This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

The OAuth Mediator supports 2 forms of OAuth. It bypasses the RESTful requests and authenticates users against WSO2 Identity Server.

When a client tries to invoke a RESTful service, it may be required to verify the credentials of the client. This can be achieved by registering an OAuth application in the WSO2 Identity Server. When the client sends a REST call with the Authorization header to the ESB, the OAuth mediator validates it with the Identity server and proceeds.

See 2-legged OAuth for Securing a RESTful Service for detailed instructions to carry out this process.

If you are using OAuth 1, you will get the org.apache.synapse.SynapseException: Unable to find SCOPE value in Synapse Message Context error when the SCOPE property is not set in the Synapse message context.

 



Syntax

<oauthService remoteServiceUrl="" username="" password=""/>

UI Configuration

The parameters available to configure the OAuth mediator are as follows.

Parameter NameDescription
OAuth ServerThe server URL of the WSO2 Identity Server.
UsernameThe user name to be used to log into the WSO2 Identity Server.
PasswordThe password used to log into the WSO2 Identity Server.

 


Examples

In the following OAuth mediator configuration accesses a remote service via the https://localhost:9443/service URL. The user accessing this service is authenticated via the OAuth application registered in the WSO2 Identity Server and accessed via the http://ws.apache.org/ns/synapse URL. The username used to log into the WSO2 Identity Server is foo and the password is bar. Both the user name and the password should be registered in the Identity Server.

<oauthService xmlns="http://ws.apache.org/ns/synapse" remoteServiceUrl="https://localhost:9443/services" username="foo" password="bar" />
  • No labels