dsuryd / dotNetify

Simple, lightweight, yet powerful way to build real-time web apps.
https://dotnetify.net
Other
1.17k stars 164 forks source link

Accessing ClaimsPrincipal after authentication #162

Closed skyleraustin closed 5 years ago

skyleraustin commented 5 years ago

I had previously proved this out in a POC (which I unfortunately deleted), but I am struggling with it now that I am implementing.

In a VM (which uses the Authorize filter), I am unable to access the current ClaimsPrincipal. I believe I was previously doing this via HttpContextAccessor.Current.User or ClaimsPrinical.Current, however both are now null/default.

Any recommendation?

skyleraustin commented 5 years ago

I was mistaken. Details here - http://dotnetify.net/core/api/security