Skip to content

Name and Role Claim types not working #25

@darianferrer

Description

@darianferrer

Hi,

I found out that if the ClaimsIdentity was built using a different key name for name and role than ClaimTypes.Name and ClaimTypes.Role, the app under test can have problems if it is using ClaimPrincipal.IsInRole or ClaimPrincipal.Identity.Name. I think this can be solved if we pass those as options (ClaimInjectorHandlerOptions) so when creating the ClaimsPrincipal we pick these values. I'll create a PR later with the solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions