Claims.razor 451 B

12345678910111213141516
  1. @page "/claims"
  2. <AuthorizeView>
  3. <Authorized>
  4. <h2>Hello @context.User.Identity.Name, here's the list of your claims:</h2>
  5. <ul>
  6. @foreach (var claim in context.User.Claims)
  7. {
  8. <li><b>@claim.Type</b>: @claim.Value</li>
  9. }
  10. </ul>
  11. </Authorized>
  12. <NotAuthorized>
  13. <p>I'm sorry, I can't display any claims until you log in</p>
  14. </NotAuthorized>
  15. </AuthorizeView>