Identiteption 1.0.1
dotnet add package Identiteption --version 1.0.1
NuGet\Install-Package Identiteption -Version 1.0.1
<PackageReference Include="Identiteption" Version="1.0.1" />
paket add Identiteption --version 1.0.1
#r "nuget: Identiteption, 1.0.1"
// Install Identiteption as a Cake Addin #addin nuget:?package=Identiteption&version=1.0.1 // Install Identiteption as a Cake Tool #tool nuget:?package=Identiteption&version=1.0.1
<p align="center"> <img width="15%" height="15%" src="https://github.com/mabroukmahdhi/Identiteption/blob/main/Assets/logo.png?raw=true"> </p>
Identiteption
.Net Library that throws exceptions based on Microsoft Identity Result IdentityResult
.
About Identity Error Codes
Source: IdentityResult
Possible error codes
- ConcurrencyFailure
- DefaultError
- DuplicateEmail
- DuplicateRoleName
- DuplicateUserName
- InvalidEmail
- InvalidRoleName
- InvalidToken
- InvalidUserName
- LoginAlreadyAssociated
- PasswordMismatch
- PasswordRequiresDigit
- PasswordRequiresLower
- PasswordRequiresNonAlphanumeric
- PasswordRequiresUniqueChars
- PasswordRequiresUpper
- PasswordTooShort
- RecoveryCodeRedemptionFailed
- UserAlreadyHasPassword
- UserAlreadyInRole
- UserLockoutNotEnabled
- UserNotInRole
What exception?
There are three types of exceptions that can be thrown: IdentityValidationException
, FailedIdentityServiceException
or IdentityServiceException
.
Error code | Throws IdentityValidationException |
Throws FailedIdentityServiceException |
Throws IdentityServiceException |
---|---|---|---|
ConcurrencyFailure | X | ||
DefaultError | X | ||
DuplicateEmail | X | ||
DuplicateRoleName | X | ||
DuplicateUserName | X | ||
InvalidEmail | X | ||
InvalidRoleName | X | ||
InvalidToken | X | ||
InvalidUserName | X | ||
LoginAlreadyAssociated | X | ||
PasswordMismatch | X | ||
PasswordRequiresDigit | X | ||
PasswordRequiresLower | X | ||
PasswordRequiresNonAlphanumeric | X | ||
PasswordRequiresUniqueChars | X | ||
PasswordRequiresUpper | X | ||
PasswordTooShort | X | ||
RecoveryCodeRedemptionFailed | X | ||
UserAlreadyHasPassword | X | ||
UserAlreadyInRole | X | ||
UserLockoutNotEnabled | X | ||
UserNotInRole | X |
Usage
It is very easy and simple to use this, you only need to call the extension Throw
:
IdentityResult identityResult = ....;
identityResult.Throw();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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 was computed. 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. |
-
net6.0
- Microsoft.Extensions.Identity.Core (>= 6.0.5)
- Xeption (>= 2.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Extension 'Throw()' added