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 1932 posts 6722 karma points MVP 3x c-trib
    Mar 02, 2023 @ 11:19
    Huw Reddick
    0

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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies