Skip to content

Instantly share code, notes, and snippets.

View MrSmoke's full-sized avatar
🦆
Beep boop

Cameron MrSmoke

🦆
Beep boop
View GitHub Profile
@MrSmoke
MrSmoke / Controller.cs
Created July 2, 2018 06:10
Saml2 Example
public async Task<IActionResult> DoChallenge(string returnUrl)
{
var context = await _interaction.GetAuthorizationContextAsync(returnUrl);
var acrTenantValue = context.AcrValues.First(v => v.StartsWith("tenantId:"));
var tentantId = acrTenantValue.Split(':')[1];
// start challenge and roundtrip the return URL and
var props = new AuthenticationProperties
{