2
votes

I am consuming REST API's from an Azure instance. There is also ACS single sign-on activated for Google, Live, Facebook, and Yahoo (followed from here http://goo.gl/KNU6H). How can I create a login page for the Azure Access Control Service using jQuery and HTML?

2

2 Answers

3
votes

The link that you mention in your question tells you almost everything you need to know. Follow the part where it tells your how to download a sample logon page. The sample page is identical to the default one hosted in the ACS. It just uses HTML and javascript (basic javascript not jQuery admitedly, but it is not complex and you should be able to refactor it into jQuery without much trouble).

The main functionality of the page is:

  • To fetch the configured identity providers from ACS. This is returned as json and for each IdP it gives you a login URL (so you can make a link) an image URL (so you can make the link pretty) a logout URL and a name.
  • Code to create DOM elements to present the IdPs as buttons
  • Code to detect the last IdP that the user selected (using a cookie) so that the page can hide the links for other IdPs so that the user can go straight to the last one used
  • Code to detect the IdP from a supplied email address

You just need to download the sample page. Customise it however you want and use it.

0
votes

I don't think you can using jQuery and HTML alone. You need some server side code to run.

Node.js, MVC and ASP.NET all work well with the Access Control Service, you could try one of those.