Skip to content

Commit

Permalink
Updating OWIN apps (#2629)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmprieur committed Jan 9, 2024
1 parent ce91b02 commit 2cddc1c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/Microsoft.Identity.Web.OWIN/AppBuilderExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ public static class AppBuilderExtension
httpContext.Session.Remove(ClaimConstants.ClientInfo);
}
Claim nameClaim = context.AuthenticationTicket.Identity.FindFirst("preferred_username")
Claim? nameClaim = context.AuthenticationTicket.Identity.FindFirst("preferred_username")
?? context.AuthenticationTicket.Identity.FindFirst("name");
if (!string.IsNullOrEmpty(nameClaim?.Value))
{
context.AuthenticationTicket.Identity.AddClaim(new Claim(ClaimTypes.Name, nameClaim.Value, string.Empty));
context.AuthenticationTicket.Identity.AddClaim(new Claim(ClaimTypes.Name, nameClaim?.Value, string.Empty));
}
return Task.CompletedTask;
Expand Down
12 changes: 6 additions & 6 deletions tests/DevApps/aspnet-mvc/OwinWebApi/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="CC7B13FFCD2DDD51" culture="neutral"/>
Expand All @@ -78,27 +78,27 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Protocols.WsFederation" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.5.0.0" newVersion="5.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Protocols.OpenIdConnect" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Protocols" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Abstractions" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Identity.Client" publicKeyToken="0A613F4DD989E8AE" culture="neutral"/>
Expand Down
12 changes: 6 additions & 6 deletions tests/DevApps/aspnet-mvc/OwinWebApp/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="CC7B13FFCD2DDD51" culture="neutral"/>
Expand All @@ -79,27 +79,27 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Protocols.WsFederation" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.5.0.0" newVersion="5.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Protocols.OpenIdConnect" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Protocols" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Abstractions" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.33.0.0" newVersion="6.33.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-6.35.0.0" newVersion="6.35.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Identity.Client" publicKeyToken="0A613F4DD989E8AE" culture="neutral"/>
Expand Down

0 comments on commit 2cddc1c

Please sign in to comment.