This documentation is for WSO2 API Manager 2.1.0. View documentation for the latest release.

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: https://wso2.org/jira/browse/DOCUMENTATION-6723

...

  1. Build the demo.client available at https://github.com/Rajith90/surf-oauth-demo/tree/v2.1.0.

  2. Copy the JARs that you built into the following locationsinto <API-M_HOME>/repository/components/lib directory.

    Note

    If you are setting up a distributed environment, Copy the JARs you built into the respective directories given below of Key Manager node and the Store node respectively.

    • API Key Manager - <API-M_KEY_MANAGER_HOME>/repository/components/lib

    • API Store - <API-M_STORE_HOME>/repository/components/lib

  3. Uncomment the <APIKeyManager> element in the /repository/conf/api-manager.xml file, which is in the API Key Manager and API Store and change the values based on your third-party implementation.

    Tip

    Tip: Be sure to replace the <RegistrationEndpoint> and <AccessToken> elements with the client registration endpoint and the access token you obtained earlier in step 7 and 6. ConsumerKey and Secret should be that of the created Resource Server. Also change the <hostname> in the <IntrospectionURL> accordingly.

    Note

    The nl.surfnet.demo.SurfOAuthClient class, which is mentioned in the following example, extends the Key Manager interface.

    Code Block
    titleExample
    <APIKeyManager>
           <KeyManagerClientImpl>nl.surfnet.demo.SurfOAuthClient</KeyManagerClientImpl>
            <Configuration>    
                <RegistrationEndpoint><Give the client registration endpoint you got in step 7></RegistrationEndpoint>
                <AccessToken><Give the access token you got in step 6></AccessToken>
                <IntrospectionURL>http://<hostname>:port/v1/tokeninfo</IntrospectionURL>
                <ConsumerKey>xxx</ConsumerKey>
                <ConsumerSecret>xxx</ConsumerSecret>
            </Configuration>
    </APIKeyManager> 
    Tip

    For a sample on Key Manager implementation, see the WSO2 default Key Manager implementation.

...