dotnet / dotnet/dotnet-api-docs

what is ClaimsIdentity.AuthenticationType for ?

Open
#8,953 7 comments 0 reactions 0 assignees View on GitHub
area-System.Security Pri3
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

I'm refering to this page:
https://learn.microsoft.com/en-us/dotnet/api/system.security.claims.claimsidentity.authenticationtype?view=net-7.0#system-security-claims-claimsidentity-authenticationtype

I'm using it like this:
```
var identity = new ClaimsIdentity(
new[] { new Claim(ClaimTypes.Name, id.ToString(CultureInfo.InvariantCulture)) },
"ApplicationCookie", // not sure what this string should be, tried a random string and it worked
ClaimTypes.Name,
ClaimTypes.Role);
```
as you can see from my comments, I tried giving it a random string as value ( `aasdf123` ), and it made no difference

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.