Windows Authentication Event

Hello, we use a new Blazor App with Windows Authentication - we have a table on the SQLServer where all the users are saved (Domain/Username) and now we want to restrict the access to the Blazor App to only that users.
Is there a possibilty to catch some like a "after authenticated" event and there we can add our logic for that?

we have also extended the ApplicationUser class with properties which one we want to set in that event...

robert

Hi @Mad.Rain,

I am not sure I understand your question. Did you manually add windows security to your application? Normally ASP.NET Identity security and Windows security don't mix and match. We have windows authentication planned for next year.

Oh - sorry wrong group - I use Radzen IDE

In that case you need to check here. This is the only supported way to specify which users or groups have access. Perhaps it would be easier for you to add the authorized users to a Windows group.

But there is a SecurityService class where the AuthenticationStateProvider is used - isn't there a possibility to override this?

robert

We haven't done that so we can't comment. Still you can try - inject a database context in that service and perform the required queries.

If I change the SecurityService.cs is that generated only if I chnage the security setting?
(so my changes persists)

No, it’s generated on every run. Add it to code generation ignore list.

I have added it to the generation ignore list and then the code is not changed - only if I change the security to none then the file was deleted - is that the expected behaviour?

Yes, if you change security to none Radzen will delete all security related files.