Class BackOfficeErrorDescriber
Umbraco back office specific Microsoft.AspNetCore.Identity.IdentityErrorDescriber
Namespace: Umbraco.Cms.Core.Security
Assembly: Umbraco.Infrastructure.dll
Syntax
public class BackOfficeErrorDescriber : UmbracoErrorDescriberBase
Constructors
View SourceBackOfficeErrorDescriber(ILocalizedTextService)
Initializes a new instance of the BackOfficeErrorDescriber class with the specified localized text service.
Declaration
public BackOfficeErrorDescriber(ILocalizedTextService textService)
Parameters
| Type | Name | Description |
|---|---|---|
| ILocalizedTextService | textService | An instance of ILocalizedTextService used for localization. |
Methods
View SourceDuplicateRoleName(string)
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that a role name is already in use.
Declaration
public override IdentityError DuplicateRoleName(string role)
Parameters
| Type | Name | Description |
|---|---|---|
| string | role | The name of the role that is duplicated. |
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the duplicate role name error. |
InvalidRoleName(string?)
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the specified role name is invalid. This error typically occurs when the provided role name does not meet the required validation rules.
Declaration
public override IdentityError InvalidRoleName(string? role)
Parameters
| Type | Name | Description |
|---|---|---|
| string | role | The role name that failed validation. |
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the invalid role name error. |
LoginAlreadyAssociated()
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the login is already associated with another user.
Declaration
public override IdentityError LoginAlreadyAssociated()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the duplicate login error. |
UserAlreadyHasPassword()
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the user already has a password set.
Declaration
public override IdentityError UserAlreadyHasPassword()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the error that the user already has a password. |
UserAlreadyInRole(string)
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating the user is already in the specified role.
Declaration
public override IdentityError UserAlreadyInRole(string role)
Parameters
| Type | Name | Description |
|---|---|---|
| string | role | The name of the role to check. |
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the error. |
UserLockoutNotEnabled()
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that lockout is not enabled for the user.
Declaration
public override IdentityError UserLockoutNotEnabled()
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the error that user lockout is not enabled. |
UserNotInRole(string)
Returns an Microsoft.AspNetCore.Identity.IdentityError indicating that the user is not in the specified role.
Declaration
public override IdentityError UserNotInRole(string role)
Parameters
| Type | Name | Description |
|---|---|---|
| string | role | The role that the user is not a member of. |
Returns
| Type | Description |
|---|---|
| IdentityError | An Microsoft.AspNetCore.Identity.IdentityError describing the error. |