Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Harshavardhan 1 post 71 karma points
    Mar 02, 2023 @ 09:54
    Harshavardhan
    0

    I am trying to implement media security handler. in HttpContext not getting the authenticated value it always showing false.

    Hi I am trying to implement media security handler. in HttpContext not getting the authenticated value it always showing false. below is what i am trying

    public async Task InvokeAsync(HttpContext context, RequestDelegate next)
            {
    if (context.User.Identities.Any(IdentityExtensions => IdentityExtensions.IsAuthenticated))
                    { do something
    }
    }
    
  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Mar 02, 2023 @ 11:19
    Huw Reddick
    0

    You can inject the IMemberManager memberManager service and then check memberManager.IsLoggedIn()

Please Sign in or register to post replies

Write your reply to:

Draft