Skip to content

Instantly share code, notes, and snippets.

@andrewconnell
Created December 17, 2014 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewconnell/2d835911b9bb01916c4a to your computer and use it in GitHub Desktop.
Save andrewconnell/2d835911b9bb01916c4a to your computer and use it in GitHub Desktop.
Azure AD & ASP.NET MVC - Walk-Through Implementing ADAL & OWIN - SettingsHelper.cs
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
namespace SampleMvcAzAuth.Utils {
public class SettingsHelper {
public static string ClientId {
get { return ConfigurationManager.AppSettings["ida:ClientID"]; }
}
public static string ClientSecret {
get { return ConfigurationManager.AppSettings["ida:Password"]; }
}
public static string AzureAdTenantId {
get { return ConfigurationManager.AppSettings["ida:TenantId"]; }
}
public static string O365DiscoveryServiceEndpoint {
get { return "https://api.office.com/discovery/v1.0/me/"; }
}
public static string O365DiscoveryResourceId {
get { return "https://api.office.com/discovery/"; }
}
public static string AzureAdGraphResourceId {
get { return "https://graph.windows.net"; }
}
public static string AzureADAuthority {
get { return string.Format("https://login.windows.net/{0}/", AzureAdTenantId); }
}
public static string ClaimTypeObjectIdentifier {
get { return "http://schemas.microsoft.com/identity/claims/objectidentifier"; }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment