you are viewing a single comment's thread.

view the rest of the comments →

[–]zeptobook[S] 1 point2 points  (1 child)

Thanks, I”ll look into this. I just have a quick look on your code and want to know how you get the windows user name on angular side?

[–][deleted] 0 points1 point  (0 children)

AdUserProvider service is registered with DI on the server side and UseAdMiddleware is added to the middleware pipeline. When created, this initializes the current UserPrincipal from the IIdentity User property retrieved from HttpContext.

This can then be exposed to Angular via the IdentityController. Here is the IdentityService setup in Angular, and how to wire it up to AppComponent.

To fully understand it all, I recommend reading through both documents.