Download presentation
Presentation is loading. Please wait.
Published byCecily Mathews Modified over 9 years ago
9
“We bought Grandma a new TV. This is what my Dad did to her remote.” http://imgur.com/r/funny/Q8GMvsa
10
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType); app.UseCookieAuthentication(new CookieAuthenticationOptions { }); app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions { Client_Id = "d71c88d1-f3d3-47e9-8313-06bc9af9a991", Authority = "https://login.windows.net/common/"https://login.windows.net/common/ }); [Authorize]
12
HttpContext.GetOwinContext().Authentication.Challenge( new AuthenticationProperties { RedirectUri = "/" }, OpenIdConnectAuthenticationDefaults.AuthenticationType); HttpContext.GetOwinContext().Authentication.SignOut( OpenIdConnectAuthenticationDefaults.AuthenticationType, CookieAuthenticationDefaults.AuthenticationType);
14
Notifications = new OpenIdConnectAuthenticationNotifications() { AccessCodeReceived = (context) => { var code = context.Code; ClientCredential credential = new ClientCredential(clientId, appKey); string tenantID = context.ClaimsIdentity.FindFirst(tenantIdClaimType).Value; AuthenticationContext authContext = new AuthenticationContext(string.Format("https://login.windows.net/{0}", tenantID)); AuthenticationResult result = authContext.AcquireTokenByAuthorizationCode( code, new Uri(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path)), credential, graphResourceID); string signedInUserID = context.ClaimsIdentity.FindFirst(ClaimTypes.NameIdentifier).Value; db.TokenCache.Add(F(signedInUserID, result )); db.SaveChanges(); return Task.FromResult(0); },
17
?
22
Azure Active Directory Premium
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.