Presentation is loading. Please wait.

Presentation is loading. Please wait.

“We bought Grandma a new TV. This is what my Dad did to her remote.”

Similar presentations


Presentation on theme: "“We bought Grandma a new TV. This is what my Dad did to her remote.”"— Presentation transcript:

1

2

3

4

5

6

7

8

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]

11

12 HttpContext.GetOwinContext().Authentication.Challenge( new AuthenticationProperties { RedirectUri = "/" }, OpenIdConnectAuthenticationDefaults.AuthenticationType); HttpContext.GetOwinContext().Authentication.SignOut( OpenIdConnectAuthenticationDefaults.AuthenticationType, CookieAuthenticationDefaults.AuthenticationType);

13

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); },

15

16

17 ?

18

19

20

21

22 Azure Active Directory Premium

23

24

25


Download ppt "“We bought Grandma a new TV. This is what my Dad did to her remote.”"

Similar presentations


Ads by Google