After successfully installing the UltimateSaml setup package you will see a web sample project in folder Samples\Saml\Web\CS\Saml2GoogleSSO for C# and Samples\Saml\Web\VB\Saml2GoogleSSO for VB.NET. This sample demonstrates Single Sign-on (SSO) with Google App. It acts as the Identity Provider while Google App is the Service Provider. To run this web sample project, open the solution file Saml2GoogleSSO_XXXX.sln, and then press F5 in the Visual Studio IDE.
Configuring the Saml2GoogleSSO Identify Provider Web Application
You only need to change the list of user credentials in web.config file. The user name specified in web.config file must match with an account name in Google Apps.
Configuring Google Apps to work with your Identity Provider
To enable and configure single sign-on in Google Apps, you can follow the following steps:
- Login to Google Apps.
- Select "Advanced tools".
- Then select "Set up single sign-on (SSO)".
- Upload certificate, such as the SP_X509Certificate_ForGoogleSP.cer in the Idp web application.
- Set Sign-in page URL, Sign-out page URL, and Change password URL. For example, when you deploy the test application on your server with domain name mydomain.com, the following URLs should be specified:
- Sign-in page URL: http://www.mydomain.com/service.aspx
- Sign-out page URL: http://www.mydomain.com/UserLogout.aspx
- Change password URL: http://www.mydomain.com/changepassword.aspx
- Add a user in Google Apps that is known to the IdP web application.
Testing the Identify Provider Web Application
The identity provider web application, in conjunction with Google Apps, demonstrates SP initiated single sign-on. To test the application, follow the steps below:
- Browse to a Google App (e.g Google Calendar at http://www.google.com/calendar/hosted/mydomain.com).
- You should then be redirected to the Idp's Login page
- Login with the credentials configured in Google App. You need to make sure that the user name specified in web.config file matches with the user name used to login to Google App.
- You should then be redirected and signed into the Google App.
- If you wish to change the account password, click on Settings, and then Google Account Settings->Change password
- To Logout from the Google App, click on the Sign out link on the Google App page.
- You should then be redirected to the Idp Sample Web Application logout page.