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
this.Logger.LogDebug("payload was fetched from easyauth headers, name: {0}",name);
95
95
96
-
varidentity=newGenericIdentity(name,"AuthenticationTypes.Federation");// setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
96
+
//var identity = new GenericIdentity(name, "AuthenticationTypes.Federation"); // setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
97
97
98
98
this.Logger.LogInformation("building claims from payload...");
this.Logger.LogInformation("Add claims to new identity");
128
128
129
-
identity.AddClaims(claims);
129
+
//identity.AddClaims(claims);
130
+
varidentity=newClaimsIdentity(claims,"AuthenticationTypes.Federation");// setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
131
+
130
132
//identity.AddClaim(new Claim("id_token", idToken)); // don't think we should be including this
131
133
//identity.AddClaim(new Claim("http://schemas.microsoft.com/claims/authnclassreference", 1)); // don't think we need to add this
132
134
if(!(identity.ClaimsasList<Claim>).Exists(claim =>claim.Type=="scp"))identity.AddClaim(newClaim("scp","user_impersonation"));// not sure why easyauth is dropping this
//var principal = new GenericPrincipal(identity, null); // maybe passing valid string[] roles for second parameter would make IsInRole work but no need just use ClaimsPrincipal
this.Logger.LogDebug("payload was fetched from easyauth me json, name: {0}",name);
142
145
143
-
varidentity=newGenericIdentity(name,"AuthenticationTypes.Federation");// setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
146
+
//var identity = new GenericIdentity(name, "AuthenticationTypes.Federation"); // setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
144
147
145
148
this.Logger.LogInformation("building claims from payload...");
this.Logger.LogInformation("Add claims to new identity");
173
176
174
-
identity.AddClaims(claims);
177
+
//identity.AddClaims(claims);
178
+
varidentity=newClaimsIdentity(claims,"AuthenticationTypes.Federation");// setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
179
+
175
180
//identity.AddClaim(new Claim("id_token", idToken)); // don't think we should be including this
176
181
//identity.AddClaim(new Claim("http://schemas.microsoft.com/claims/authnclassreference", 1)); // don't think we need to add this
177
182
if(!(identity.ClaimsasList<Claim>).Exists(claim =>claim.Type=="scp"))identity.AddClaim(newClaim("scp","user_impersonation"));// not sure why easyauth is dropping this
//var principal = new GenericPrincipal(identity, null); // maybe passing valid string[] roles for second parameter would make IsInRole work but no need just use ClaimsPrincipal
0 commit comments