1

@Ogglas stated:

If you create a new project and choose Blazor with Windows Authentication you get a file called Shared\LoginDisplay.razor with the following content:

<AuthorizeView>
    Hello, @context.User.Identity.Name!
</AuthorizeView>

My Question:

  • How can I add the logged-in user's picture to this component?
Jim G.
  • 15,141
  • 22
  • 103
  • 166
  • The page is HTML. So add like following : https://www.canto.com/blog/insert-image-html/?force_isolation=true#:~:text=Copy%20and%20paste%20your%20image,parameters%20prefaced%20by%20a%20src. – jdweng Sep 21 '22 at 16:53
  • @jdweng HTML is not my problem. How can I use the Active Directory picture to inform the `img` tag's `src` attribute? – Jim G. Sep 21 '22 at 17:17
  • What claims can you see in `HttpContext.User`? – Pieterjan Sep 21 '22 at 17:21
  • What you posted is the Authorize tag inside html data. You need to add the picture just like any other html tag – jdweng Sep 21 '22 at 17:23
  • @jdweng Again - The HTML is not my issue. – Jim G. Sep 21 '22 at 17:24

0 Answers0