OLT.Identity.ClaimTypeNames
0.1.0-beta-0005
Prefix Reserved
See the version list below for details.
dotnet add package OLT.Identity.ClaimTypeNames --version 0.1.0-beta-0005
NuGet\Install-Package OLT.Identity.ClaimTypeNames -Version 0.1.0-beta-0005
<PackageReference Include="OLT.Identity.ClaimTypeNames" Version="0.1.0-beta-0005" />
paket add OLT.Identity.ClaimTypeNames --version 0.1.0-beta-0005
#r "nuget: OLT.Identity.ClaimTypeNames, 0.1.0-beta-0005"
// Install OLT.Identity.ClaimTypeNames as a Cake Addin #addin nuget:?package=OLT.Identity.ClaimTypeNames&version=0.1.0-beta-0005&prerelease // Install OLT.Identity.ClaimTypeNames as a Cake Tool #tool nuget:?package=OLT.Identity.ClaimTypeNames&version=0.1.0-beta-0005&prerelease
OLT.Identity.ClaimTypeNames
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.
Features
- Comprehensive list of OpenID Connect and JWT claim types.
- Centralized and consistent set of claim type definitions.
- Simplifies the process of working with standard claims in .NET applications.
Installation
You can install the package via NuGet:
dotnet add package OLT.Identity.ClaimTypeNames
Usage
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;
Claim Types
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 zone
License
This 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 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
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 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.0 | 141 | 12/6/2024 |
0.1.0-beta-0005 | 70 | 12/6/2024 |