Clarity, Technology, and Solving Problems | PracticeThis.com
WP7 App with Key Windows Azure resources – Slides, Videos, How-To’s, and T-shooting – for quick consumption on the go.
LinkedIn
This simple walkthrough shows how to use Management Service of Windows Azure AppFabric Access Control Service (ACS) v2 to programmatically add Facebook as an identity provider. Complete walkthrough can be found here - Windows Azure AppFabric Access Control Service v2 - Adding Identity Provider Using Management Service.
The code related to Facebook is cannibalized from the end-to-end SaaS sample - FabrikamShipping SaaS Demo Source Code.
Code samples with other functionalities is available here - Code Sample: Management Service.
Other ACS code samples available here - Code Samples Index.
Code related to this post can be found here. Next I will call out changes and differences comparing to Windows Azure AppFabric Access Control Service v2 - Adding Identity Provider Using Management Service.
To complete this walkthrough:
var facebookKeys = new[] { new IdentityProviderKey { IdentityProvider = facebook, StartDate = DateTime.UtcNow, EndDate = DateTime.UtcNow.AddYears(1), Type = "ApplicationKey", Usage = "ApplicationId", Value = Encoding.Default.GetBytes(facebookAppId) }, new IdentityProviderKey { IdentityProvider = facebook, StartDate = DateTime.UtcNow, EndDate = DateTime.UtcNow.AddYears(1), Type = "ApplicationKey", Usage = "ApplicationSecret", Value = Encoding.Default.GetBytes(facebookAppSecret) } };