This documentation is for WSO2 API Manager 1.9.0. View documentation for the latest release.
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

Version 1 Next »

When an application access token is generated, an OAuth client is created underneath. The consumer key and consumer secret shown under a key type actually belongs to the OAuth client. In previous releases of API Manager, the only way to create an OAuth client was through the API Store. However, there can be situations where an OAuth client is created elsewhere, but needs to be associated with an application in the API Store. For instance, in an organisation where WSO2 Identity Server is used as the authoritative server, OAuth clients may only be created through the Identity Server. Similarly, when a third party OAuth provider is used, users might want to use previously created OAuth clients with the API Manager.

To achieve this, you can provision the OAuth clients created outside the API Store into the API Manager, thereby associating the OAuth client with an application in the API Store. Once the mapping is done, you can use it in the same way as an OAuth client created through the API Store. 

Note that when you delete an application, the underlying OAuth client is not deleted if it has been provisioned into the API Store.

The steps below describe how to provision OAuth clients created outside the API Store into the API Manager:

  1. First, create an OAuth client outside the API Store. In this example, we use a standalone API Manager instance and do this via the management console of the API Manager. 

    In a setup where WSO2 Identity Server is used as the Key Manager, this step is performed in the Identity Server.
  2. Log in to the APIM management console (https://<Server Host>:9443/carbon) and click Add under Service Providers.
  3. Give a name for the service provider and click Register.
  4. Click Configure under Inbound Authentication Configuration > OAuth/OpenId Connect Configuration to add a new OAuth client.
  5. Provide a callback URL. If you do not have a callback URL, you can clear the Code and Implicit authorization grant types and add the OAuth client.
    You have now created the OAuth client and are provided with the OAuth client key and OAuth client secret.
  6. Next, enable the option to provide out-of-band keys by opening the <APIM_HOME>/repository/deployment/server/jaggeryapps/store/site/conf/site.json file and changing the "mapExistingAuthApps" setting to true.

    "mapExistingAuthApps" : true
  7. Log in to the API Store.
  8. In the My Subscriptions page, notice that you now see a Provide Keys button for your application.
  9. Click the Provide Keys button, paste the consumer key and consumer secret pair and click Save.

    If you receive an error when you click Save, use the OAuth Admin Service to provision the out-of-band OAuth client. 

    You have successfully provisioned an out-of-band OAuth client. 

  • No labels