Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download WSO2 Identity Server and WSO2 ESB.
  2. Extract the WSO2 Identity Server and WSO2 ESB ZIP files into a directory in your file system. Call them IS_HOME and ESB_HOME respectively.
  3. Start WSO2 Identity Server and WSO2 ESB by running wso2server.sh (in unix) or wso2server.bat (in windows) which can be found in IS_HOME/bin and ESB_HOME/bin directories respectively. 

    Info
    titleNote

    If both servers are running in the localhost, change the default ports. For example, change the WSO2 ESB https port to 9445 and http port to 9765 (default 9443 and 9763 respectively) by configuring mgt-transport.xml which can be found in ESB_HOME/repository/conf.

  4. Go to WSO2 IS Management Console by pointing your browser to https://localhost:9443/carbon/.
  5. Register a user with WSO2 Identity Server by providing a username and password.
  6. Download sample OAuth client source code from following svn location: https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/identity/org.wso2.carbon.identity.samples.oauth/.
  7. You can build the sample using maven (mvn clean install) or add the Jars in the IS_HOME/repository/components/plugins directory to a sample project class path.
  8. Go to the ESB Management Console by entering the following your browser: https://localhost:9445/carbon/.
  9. Sign-in as an admin by providing a username and password.
  10. Create a proxy service in WSO2 ESB by adding following configuration in to the service bus configuration which can be found under Manage > Service Bus > Source View. Alternatively, simply update the synapse configuration of ESB with the content in org.wso2.carbon.identity.samples.oauth/src/main/resources/synapse.xml.

    Code Block
    languagehtml/xml
    <proxy name="OAuthProxy" transports="https http" startOnLoad="true" trace="disable">
            <target>
                <inSequence>
                    <oauthService remoteServiceUrl="https://localhost:9443/services/"/>
                    <send>
                        <endpoint>
                            <address uri="http://localhost:8280/services/echo" format="rest"/>
                        </endpoint>
                    </send>
                </inSequence>
                <outSequence>
                    <send/>
                </outSequence>
            </target>
    </proxy>
    Info
    titleNote

    Please note that remoteServiceUrl contains the host name and the port that WSO2 Identity Server is running.

  11. Run the sample client. Make sure to update variables: IDENTITY_SERVER, ESB_SERVER, USER_NAME and PASSWORD, according to your configurations.

...