Class UmbracoErrorDescriberBase
Serves as the base class for creating custom error describers related to Umbraco security operations. Inherit from this class to provide localized or customized error messages for security-related functionality.
Inheritance
Namespace: Umbraco.Cms.Core.Security
Assembly: Umbraco.Infrastructure.dll
Syntax
public abstract class UmbracoErrorDescriberBase : IdentityErrorDescriber
Constructors
View SourceUmbracoErrorDescriberBase(ILocalizedTextService)
Declaration
protected UmbracoErrorDescriberBase(ILocalizedTextService textService)
Parameters
| Type | Name | Description |
|---|---|---|
| ILocalizedTextService | textService |
Methods
View SourceConcurrencyFailure()
Returns an Microsoft.AspNetCore.Identity.IdentityError that indicates a concurrency failure occurred, such as when a data update conflict is detected.
Declaration
public override IdentityError ConcurrencyFailure()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the concurrency failure error. |
DefaultError()
Returns an Microsoft.AspNetCore.Identity.IdentityError that represents a general or unspecified error.
Declaration
public override IdentityError DefaultError()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError with a default error code and a localized description. |
DuplicateEmail(string)
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the specified email address is already in use.
Declaration
public override IdentityError DuplicateEmail(string email)
Parameters
| Type | Name | Description |
|---|---|---|
| string | The email address that is duplicated. |
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the duplicate email error. |
DuplicateUserName(string)
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the specified user name already exists.
Declaration
public override IdentityError DuplicateUserName(string userName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userName | The user name that is duplicated. |
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the duplicate user name error. |
InvalidEmail(string?)
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating the specified email is invalid.
Declaration
public override IdentityError InvalidEmail(string? email)
Parameters
| Type | Name | Description |
|---|---|---|
| string | The email address that is invalid. |
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the invalid email error. |
InvalidToken()
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the token is invalid.
Declaration
public override IdentityError InvalidToken()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the invalid token error. |
InvalidUserName(string?)
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the specified user name is invalid.
Declaration
public override IdentityError InvalidUserName(string? userName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userName | The user name that is invalid. |
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the invalid user name error. |
PasswordMismatch()
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the provided password is incorrect.
Declaration
public override IdentityError PasswordMismatch()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the password mismatch. |
PasswordRequiresDigit()
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the password requires at least one digit.
Declaration
public override IdentityError PasswordRequiresDigit()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the digit requirement for the password. |
PasswordRequiresLower()
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the password requires a lowercase letter.
Declaration
public override IdentityError PasswordRequiresLower()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the lowercase letter requirement. |
PasswordRequiresNonAlphanumeric()
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the password requires a non-alphanumeric character.
Declaration
public override IdentityError PasswordRequiresNonAlphanumeric()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the non-alphanumeric password requirement. |
PasswordRequiresUniqueChars(int)
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the password must contain at least a specified number of unique characters.
Declaration
public override IdentityError PasswordRequiresUniqueChars(int uniqueChars)
Parameters
| Type | Name | Description |
|---|---|---|
| int | uniqueChars | The minimum number of unique characters required in the password. |
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the unique character requirement for the password. |
PasswordRequiresUpper()
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the password requires at least one uppercase letter.
Declaration
public override IdentityError PasswordRequiresUpper()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the uppercase letter requirement. |
PasswordTooShort(int)
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the provided password is too short.
Declaration
public override IdentityError PasswordTooShort(int length)
Parameters
| Type | Name | Description |
|---|---|---|
| int | length | The minimum required length for the password. |
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the password length requirement. |
RecoveryCodeRedemptionFailed()
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that redemption of a recovery code has failed, typically due to expiration or invalidity.
Declaration
public override IdentityError RecoveryCodeRedemptionFailed()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the failure to redeem a recovery code. |