diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Controllers/AuthorizationController.cs b/dotnet-authserver/src/TeacherIdentity.AuthServer/Controllers/AuthorizationController.cs index a9c9ba44c..84d05152a 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Controllers/AuthorizationController.cs +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Controllers/AuthorizationController.cs @@ -393,11 +393,9 @@ public async Task Exchange() Claims.Name, Claims.Role); // Use the client_id as the subject identifier. - identity.AddClaim(Claims.Subject, (await _applicationManager.GetClientIdAsync(application))!, - Destinations.AccessToken, Destinations.IdentityToken); + identity.SetClaim(Claims.Subject, (await _applicationManager.GetClientIdAsync(application))!); - identity.AddClaim(Claims.Name, (await _applicationManager.GetDisplayNameAsync(application))!, - Destinations.AccessToken, Destinations.IdentityToken); + identity.SetClaim(Claims.Name, (await _applicationManager.GetDisplayNameAsync(application))!); // Note: In the original OAuth 2.0 specification, the client credentials grant // doesn't return an identity token, which is an OpenID Connect concept. diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Program.cs b/dotnet-authserver/src/TeacherIdentity.AuthServer/Program.cs index f63b2da88..53bbaf264 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Program.cs +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Program.cs @@ -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() diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/TeacherIdentity.AuthServer.csproj b/dotnet-authserver/src/TeacherIdentity.AuthServer/TeacherIdentity.AuthServer.csproj index 9a14d52ea..c9304f1f2 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/TeacherIdentity.AuthServer.csproj +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/TeacherIdentity.AuthServer.csproj @@ -30,7 +30,6 @@ - @@ -38,8 +37,8 @@ - - + +