You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// build up identity from X-MS-TOKEN-AAD-ID-TOKEN header set by EasyAuth filters if user openid connect session cookie or oauth bearer token authenticated ...
this.Logger.LogDebug("payload was fetched from easyauth headers, name: {0}",name);
98
95
99
96
varidentity=newGenericIdentity(name,"AuthenticationTypes.Federation");// setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
100
97
101
98
this.Logger.LogInformation("building claims from payload...");
//foreach (var claim in xMsClientPrincipal["claims"]) { if (claim["typ"].ToString() == ClaimTypes.NameIdentifier) { nameidentifier = claim["val"].ToString(); } } // line above works not required
//identity.AddClaim(new Claim("id_token", idToken)); // don't think we should be including this
140
131
//identity.AddClaim(new Claim("http://schemas.microsoft.com/claims/authnclassreference", 1)); // don't think we need to add this
141
-
if(!(identity.ClaimsasList<Claim>).Exists(claim =>claim.Type=="scp"))identity.AddClaim(newClaim("scp","user_impersonation"));// not sure why easyauth not including this
if(!(identity.ClaimsasList<Claim>).Exists(claim =>claim.Type=="scp"))identity.AddClaim(newClaim("scp","user_impersonation"));// not sure why easyauth is dropping this
this.Logger.LogDebug("payload was fetched from easyauth me json, name: {0}",name);
154
142
155
143
varidentity=newGenericIdentity(name,"AuthenticationTypes.Federation");// setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
//identity.AddClaim(new Claim("id_token", idToken)); // don't think we should be including this
188
176
//identity.AddClaim(new Claim("http://schemas.microsoft.com/claims/authnclassreference", 1)); // don't think we need to add this
189
-
if(!(identity.ClaimsasList<Claim>).Exists(claim =>claim.Type=="scp"))identity.AddClaim(newClaim("scp","user_impersonation"));// not sure why easyauth not including this
if(!(identity.ClaimsasList<Claim>).Exists(claim =>claim.Type=="scp"))identity.AddClaim(newClaim("scp","user_impersonation"));// not sure why easyauth is dropping this
0 commit comments