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
-
//var identity = new GenericIdentity(name, "AuthenticationTypes.Federation"); // setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
97
-
98
96
this.Logger.LogInformation("building claims from payload...");
this.Logger.LogInformation("Add claims to new identity");
128
-
129
-
//identity.AddClaims(claims);
125
+
this.Logger.LogInformation("building new identity from claims");
130
126
varidentity=newClaimsIdentity(claims,"AuthenticationTypes.Federation");// setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
131
127
132
128
//identity.AddClaim(new Claim("id_token", idToken)); // don't think we should be including this
133
129
//identity.AddClaim(new Claim("http://schemas.microsoft.com/claims/authnclassreference", 1)); // don't think we need to add this
134
130
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);
145
140
146
-
//var identity = new GenericIdentity(name, "AuthenticationTypes.Federation"); // setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
147
-
148
141
this.Logger.LogInformation("building claims from payload...");
this.Logger.LogInformation("Add claims to new identity");
176
-
177
-
//identity.AddClaims(claims);
168
+
this.Logger.LogInformation("building new identity from claims");
178
169
varidentity=newClaimsIdentity(claims,"AuthenticationTypes.Federation");// setting ClaimsIdentity.AuthenticationType to value that azuread non-easyauth setups use
179
170
180
171
//identity.AddClaim(new Claim("id_token", idToken)); // don't think we should be including this
181
172
//identity.AddClaim(new Claim("http://schemas.microsoft.com/claims/authnclassreference", 1)); // don't think we need to add this
182
173
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