![]() |
VOOZH | about |
dotnet add package OLT.Identity.ClaimTypeNames --version 1.0.0
NuGet\Install-Package OLT.Identity.ClaimTypeNames -Version 1.0.0
<PackageReference Include="OLT.Identity.ClaimTypeNames" Version="1.0.0" />
<PackageVersion Include="OLT.Identity.ClaimTypeNames" Version="1.0.0" />Directory.Packages.props
<PackageReference Include="OLT.Identity.ClaimTypeNames" />Project file
paket add OLT.Identity.ClaimTypeNames --version 1.0.0
#r "nuget: OLT.Identity.ClaimTypeNames, 1.0.0"
#:package OLT.Identity.ClaimTypeNames@1.0.0
#addin nuget:?package=OLT.Identity.ClaimTypeNames&version=1.0.0Install as a Cake Addin
#tool nuget:?package=OLT.Identity.ClaimTypeNames&version=1.0.0Install as a Cake Tool
Provides a comprehensive list of OpenID Connect and JWT claim types as constants. This library includes registered claims from various sources such as OpenID Connect Core, RFC 7519, and other widely-used identity frameworks. It simplifies the process of working with standard claims in .NET applications by offering a centralized and consistent set of claim type definitions.
You can install the package via NuGet:
dotnet add package OLT.Identity.ClaimTypeNames
Here's a basic example of how to use the ClaimTypeNames:
using OLT.Identity.Abstractions;
class Program
{
static void Main()
{
Console.WriteLine($"Identity Provider Claim: {ClaimTypeNames.IdentityProvider}");
Console.WriteLine($"Email Claim: {ClaimTypeNames.Email}");
Console.WriteLine($"Audience Claim: {ClaimTypeNames.Audience}");
}
}
Within a Http Context
using OLT.Identity.Abstractions;
...
var nameId = HttpContext?.User.Claims.FirstOrDefault(p => p.Type == ClaimTypeNames.NameId)?.Value;
The OpenIdClaimTypes class provides a wide range of claim types, including but not limited to:
IdentityProvider: Identity Provider (typically used for local built-in providers)AccessTokenHash: Access Token ValidationActive: If Token is still ActiveAddress: Preferred postal addressAudience: The "aud" (audience) claim identifies the recipients that the JWT is intended forAuthenticationContextReference: Requested Authentication Context Class Reference valuesAuthenticationMethodReference: Authentication Methods ReferencesAuthenticationTime: Time when the End-User authentication occurredAuthorizationServer: End-User's Authorization ServerAuthorizedParty: Authorized party - the party to which the ID Token was issuedBirthdate: End-User's birthday, represented as an ISO 8601:2004 YYYY-MM-DD formatClientId: Client Id of Application with Authorization ServerCodeHash: The c_hash in the ID Token enables Clients to prevent Authorization Code substitutionCountry: Address Claim - Country name componentEmail: End-User's preferred e-mail addressEmailVerified: True if the End-User's e-mail address has been verified; otherwise falseExpiresAt: The "exp" (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processingFamilyName: Surname(s) or last name(s) of the End-UserFormatted: Address Claim - Full mailing address, formatted for display or use on a mailing labelGender: End-User's genderGivenName: Given name(s) or first name(s) of the End-UserIssuedAt: The "iat" (issued at) claim identifies the time at which the JWT was issuedIssuer: The "iss" (issuer) claim identifies the principal that issued the JWTLocale: End-User's locale, represented as a BCP47 language tagLocality: Address Claim - City or locality componentJwtId: The "jti" (JWT ID) claim provides a unique identifier for the JWTKeyId: End-User's Unique Key IdMiddleName: Middle name(s) of the End-UserName: End-User's full name in displayable formNameId: End-User's Unique Name IdNickname: Casual name of the End-UserNonce: String value used to associate a Client session with an ID Token, and to mitigate replay attacksNotBefore: The "nbf" (not before) claim identifies the time before which the JWT MUST NOT be accepted for processingPhoneNumber: End-User's preferred telephone numberPhoneNumberVerified: True if the End-User's phone number has been verified; otherwise falsePicture: URL of the End-User's profile picturePostalCode: Address Claim - Zip code or postal code componentPreferredUsername: Shorthand name by which the End-User wishes to be referred to at the RPProfile: URL of the End-User's profile pageRegion: Address Claim - State, province, prefecture, or region componentRole: RolesScope: OpenID Connect Clients use scope valuesStreetAddress: Full street address componentSubject: The "sub" (subject) claim identifies the principal that is the subject of the JWTTokenType: Token Type - Auth Type/Method (Bearer, API Key, etc.)Typ: The "typ" (type) Header Parameter used by JWT applications to declare the media type of this complete JWTUpdatedAt: Time the End-User's information was last updatedUsername: The username used to loginWebsite: URL of the End-User's Web page or blogZoneinfo: String from zoneinfo time zone database representing the End-User's time zoneThis project is licensed under the MIT License. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 2 NuGet packages that depend on OLT.Identity.ClaimTypeNames:
| Package | Downloads |
|---|---|
|
OLT.AspNetCore.Authentication.JwtBearer
OLT AspNetCore Autentication for JWT Tokens |
|
|
OLT.Core.Model.Abstractions
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 965 | 12/25/2025 |
| 0.1.0 | 1,734 | 12/6/2024 |
| 0.1.0-beta-0005 | 176 | 12/6/2024 |