Skip to content

Commit

Permalink
Backout OpenIddict 4 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Nov 3, 2023
1 parent f2294f6 commit 36fc95b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,11 @@ public async Task<IActionResult> Exchange()
Claims.Name, Claims.Role);

// Use the client_id as the subject identifier.
identity.SetClaim(Claims.Subject, (await _applicationManager.GetClientIdAsync(application))!);
identity.AddClaim(Claims.Subject, (await _applicationManager.GetClientIdAsync(application))!,
Destinations.AccessToken, Destinations.IdentityToken);

identity.SetClaim(Claims.Name, (await _applicationManager.GetDisplayNameAsync(application))!);
identity.AddClaim(Claims.Name, (await _applicationManager.GetDisplayNameAsync(application))!,
Destinations.AccessToken, Destinations.IdentityToken);

// Note: In the original OAuth 2.0 specification, the client credentials grant
// doesn't return an identity token, which is an OpenID Connect concept.
Expand Down
8 changes: 4 additions & 4 deletions dotnet-authserver/src/TeacherIdentity.AuthServer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,10 @@ public static async Task Main(string[] args)
options.SetIssuer(new Uri(baseAddress));

options
.SetAuthorizationEndpointUris("connect/authorize")
.SetLogoutEndpointUris("connect/signout")
.SetTokenEndpointUris("connect/token")
.SetUserinfoEndpointUris("connect/userinfo");
.SetAuthorizationEndpointUris("/connect/authorize")
.SetLogoutEndpointUris("/connect/signout")
.SetTokenEndpointUris("/connect/token")
.SetUserinfoEndpointUris("/connect/userinfo");

options
.AllowAuthorizationCodeFlow()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.1.175" />
<PackageReference Include="MiniValidation" Version="0.9.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.11" />
<PackageReference Include="OpenIddict.AspNetCore" Version="4.9.0" />
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="4.9.0" />
<PackageReference Include="OpenIddict.AspNetCore" Version="3.1.1" />
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Optional" Version="4.0.0" />
<PackageReference Include="Polly" Version="8.0.0" />
<PackageReference Include="RedisRateLimiting.AspNetCore" Version="1.0.9" />
Expand Down

0 comments on commit 36fc95b

Please sign in to comment.