For latest instructions on how to configuring the Github authenticator, see Github Authenticator Github repository.
This page provides instructions on how to configure the Github authenticator and Identity Server using a sample app. You can find more information in the following sections.
Github Authenticator is supported by Identity Server 5.1.0 upwards.
Deploying Github artifacts
Download the artifacts for this authenticator from the store.
Place the org.wso2.carbon.identity.authenticator.github-1.0.0.jar file into the
If you want to upgrade the Github Authenticator (.jar) in your existing IS pack, please refer upgrade instructions.
Configuring the Github App
- Go to https://www.github.com/, and create a github account.
- Register your app at https://github.com/settings/applications/new .
https://localhost:9443/commonauthas the authorization callback URL when you register the client.
- Now you can get the clientId and clientSecret of your created app.
Deploying travelocity.com sample app
The next step is to deploy the sample app in order to use it in this scenario.
Configuring the identity provider
Now you have to configure WSO2 Identity Server by adding a new identity provider.
Download the WSO2 Identity Server from here.
- Run the WSO2 Identity Server.
- Log in to the management console as an administrator.
- In the Identity Providers section under the Main tab of the management console, click Add.
- Give a suitable name for Identity Provider Name.
Navigate to Github Configuration under Federated Authenticators.
Enter the values as given in the above figure.
- Client Id: Client Id for your app.
- Client Secret: Client Secret for your app.
- Scope: Scope of the authorize token. For information on available scopes, see Scopes.
- Callback URL: Service Provider's URL where code needs to be sent .
Select both checkboxes to Enable the Github authenticator and make it the Default.Click here to see descriptions about configuration property values
Property Description Sample Value Enable Selecting this option enables github to be used as an authenticator for users provisioned to the Identity Server. Selected Default Selecting the Default checkbox signifies that github is the main/default form of authentication. This removes the selection made for any other Default checkboxes for other authenticators. Selected ClientID This is the username from the github application 8437ce9b8cfdf282c92b Client Secret This is the password from the github application. Click the Show button to view the value you enter. 7219bb5e92f4287cb5134b73760e039e55d235d Scope Scope of the authorize token. For information on available scopes, see Scopes. Callback URL
This is the URL to which the browser should be redirected after the authentication is successful. The URL should be specified in the following format:
You have now added the identity provider.
Configuring the service provider
The next step is to configure the service provider.
Return to the management console.
In the Service Providers section, click Add under the Main tab.
Since you are using travelocity as the sample, enter travelocity.com in the Service Provider Name text box and click Register .
In the Inbound Authentication Configuration section, click Configure under the SAML2 Web SSO Configuration section.
Now set the configuration as follows:
Assertion Consumer URL:
- Select the following check-boxes:
Enable Response Signing.
Enable Single Logout.
Enable Attribute Profile.
- Include Attributes in the Response Always.
Click Update to save the changes. Now you will be sent back to the Service Providers page.
Navigate to the Local and Outbound Authentication Configuration section.
Select the identity provider you created from the drop-down list under Federated Authentication.
Ensure that the Federated Authentication radio button is selected and click Update to save the changes.
You have now added and configured the service provider.
Testing the sample
To test the sample, go to the following URL:
Login with SAML from the WSO2 Identity Server.
Enter your Github credentials in the prompted login page of Github. Once you log in successfully you will be taken to the home page of the travelocity.com app.