Hello,
I'm trying to localize error descriptions that returned from connect/token
endpoint, if there is a way to do that, could you produce it?
As a try to do that, I decided to override some methods from TokenController
to return localized error_description
, but I couldn't find the controller in Volo.Abp.OpenIddict.Controllers
namespace.
Please advice.
- ABP Framework version: v6.0.3
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace:
- Steps to reproduce the issue:"
5 Answer(s)
-
0
Hi,
Yes, the way is to override the
TokenController
.but I couldn't find the controller in Volo.Abp.OpenIddict.Controllers namespace.
Are you using the
OpenIddict
? you need to custom it in theAuthServer
(if exists) orHttpApi.Host
project -
0
-
0
Hi,
Can you share the
.csproj
file content?BTW, it's working for me:
[Dependency(ReplaceServices = true)] [ExposeServices(typeof(TokenController))] public class MyTokenController : Volo.Abp.OpenIddict.Controllers.TokenController { protected override Task<IActionResult> HandlePasswordAsync(OpenIddictRequest request) { return base.HandlePasswordAsync(request); } }
-
0
-
0
Hi,
The project you're shared is
HttpApi
notHttpApi.Host
.You can look up which project references the
Volo.Abp.Account.Pro.Public.Web.OpenIddict
package and customTokenController
in it.