Configuring the GitHub Integration with the OAuth Authentication

The Oxygen XML Editor SDK includes a plugin that allows you to use the WebApp Component to edit files stored in a GitHub repository.

You can configure your GitHub integration to use the OAuth authentication method to access files stored in a public or private repository. You will then have access to a Login with GitHub button in the GitHub login dialog box, allowing you to avoid having to enter your login credentials to access files in the repository.

Follow this procedure to implement OAuth support in your WebApp Component GitHub integration:

  1. Login to GitHub and create a developer application at https://github.com/settings/applications/new.
    1. Complete the form.
    2. The Authorization callback URL field should include the following path: [OXYGEN-WEBAPP-INSTALL DIR]/plugins-dispatcher/github-oauth/callback.
  2. Click on Register application to obtain the Client ID and Client Secret credentials (they are displayed at the top-right section of the resulting page).
  3. Create a new properties file called github-plugin.properties in the WEB-INF folder of the OXYGEN-WEBAPP directory and include the credentials from the previous step.
    The properties file should include the following content:
    client_id=<client_id>
    client_secret=<client_secret>
    Note: You can also use the Administration Page to set the Client ID and Client Secret without creating the github-plugin.properties file.
  4. Restart the WebApp Component.
    You now have access to the Login with GitHub button in the GitHub login dialog box.