Skip to content

Instantly share code, notes, and snippets.

@shawnweisfeld
Created July 20, 2016 20:51
Show Gist options
  • Save shawnweisfeld/505d049eafae551e800d826911b8ee64 to your computer and use it in GitHub Desktop.
Save shawnweisfeld/505d049eafae551e800d826911b8ee64 to your computer and use it in GitHub Desktop.
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = clientId,
Authority = $"{aadInstanceGov}common",
PostLogoutRedirectUri = postLogoutRedirectUri,
AuthenticationType = "AADC",
TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
{
// instead of using the default validation (validating against a single issuer value, as we do in line of business apps),
// we inject our own multitenant validation logic
ValidateIssuer = false,
},
});
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = clientIdGov,
Authority = $"{aadInstanceGov}common",
PostLogoutRedirectUri = postLogoutRedirectUri,
AuthenticationType = "AADG",
TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
{
// instead of using the default validation (validating against a single issuer value, as we do in line of business apps),
// we inject our own multitenant validation logic
ValidateIssuer = false,
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment