Configuring a Git Plugin to Use GitHub Authentication

Oxygen XML Web Author includes a plugin that allows you to edit files stored in a Git repository. The Git Plugin allows you to access repositories simply by using your Git login credentials.

You can also configure your Git plugin to allow OAuth authentication for GitHub integrations to access files stored in a public or private repository. You will then have access to a Login with GitHub button in the Git Login dialog box. You can configure your integration either by using github.com or with a GitHub Enterprise deployment.

Figure: Git Login Dialog Box

Configure a Git Integration with github.com

To configure your Git integration using github.com, follow this procedure:
  1. Login to GitHub and register a new 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_WEBAUTHOR_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. Set your Client ID and Client Secret credentials in your plugin configuration by doing the following:
    1. Go to the Administration Page.
    2. In the Plugins section, click on the Configure icon for the GitHub plugin.
    3. Enter the Client ID and Client Secret in the Plugin configuration dialog box.
  4. Restart the Oxygen XML Web Author.

Result: You now have access to the Login with GitHub button in the Git Login dialog box.

Configure a Git Integration with a GitHub Enterprise Deployment

To configure your Git integration using a GitHub Enterprise deployment, follow this procedure:
  1. Login to GitHub Enterprise and register a new developer application. The URL is: [GithubEnterpriseUrl]/settings/applications/new.
    1. Complete the form.
    2. The Authorization callback URL field should include the following path: [OXYGEN_WEBAUTHOR_INSTALL_DIR]/plugins-dispatcher/github-oauth/callback.
  2. Obtain the Client ID and Client Secret credentials at: [GithubEnterpriseUrl]/settings/developers.
  3. Set the Client ID, Client Secret, and the API URL in your plugin configuration by doing the following:
    1. Go to the Administration Page.
    2. In the Plugins section, click on the Configure icon for the GitHub plugin, enable the Use GitHub Enterprise option, and enter the API URL, Client ID, and Client Secret in the Plugin configuration dialog box. The API URL is the URL of your GitHub Enterprise deployment ([GithubEnterpriseUrl]).
  4. Restart the Oxygen XML Web Author.

Result: You now have access to the Login with GitHub button in the Git Login dialog box.