Replies: 2 comments
-
@volkanceylan @VictorTomaili what do you thing? Is there any solution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
https://serenity.is/docs/startsharp/features/openid-integration We offer an OpenIddict implementation complete with token authentication exclusively for Startsharp customers. If you need token authentication, you’ll have to either build your own solution or purchase Startsharp. Sharing our implementation would mean giving away our proprietary source code for free, which isn’t an option. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently maintaining two Serenity applications - an older one running on ASP.NET 4.x with Serenity v3.15 and a newer one on .NET 8 with Serenity v8.6.
I need to implement API Key authentication for specific endpoints in both applications. I've successfully implemented this in the older application, but I'm struggling to get a similar solution working in the newer .NET 8 version.
Working solution for Serenity v3.15 (ASP.NET 4.x)
I've implemented the following authentication filter that works perfectly:
And registered it like this:
This approach allows me to bypass Serenity's cookie-based authentication for specific API endpoints when a valid API key is provided in the X-API-Key header.
Attempted solutions for Serenity v8.6 (.NET 8)
I've tried several approaches in the newer .NET 8 version:
ApiKeyAuthenticationHandler
inheriting fromAuthenticationHandler<AuthenticationSchemeOptions>
and registering it in Program.csAllowApiKeyAttribute
None of these approaches seem to be working with Serenity's authentication mechanism in v8.6. Either the API key is ignored, or I encounter issues with the authentication pipeline.
Questions
Any guidance would be much appreciated as I need to expose these endpoints to external systems that can't use cookie-based authentication.
Beta Was this translation helpful? Give feedback.
All reactions