IdentityErrorDescriber Class

Summary

Service to enable localization for application facing identity errors.

Syntax

public class IdentityErrorDescriber

GitHub

View on GitHub

class Microsoft.AspNet.Identity.IdentityErrorDescriber

Methods

ConcurrencyFailure()

Returns an Microsoft.AspNet.Identity.IdentityError indicating a concurrency failure.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating a concurrency failure.
public virtual IdentityError ConcurrencyFailure()
DefaultError()

Returns the default Microsoft.AspNet.Identity.IdentityError.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:The default <see cref=”T:Microsoft.AspNet.Identity.IdentityError” />,
public virtual IdentityError DefaultError()
DuplicateEmail(System.String)

Returns an Microsoft.AspNet.Identity.IdentityError indicating the specified email is already associated with an account.

Arguments:
  • email (System.String) – The email that is already associated with an account.
Return type:

Microsoft.AspNet.Identity.IdentityError

Returns:

An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating the specified <paramref name=”email” /> is already associated with an account.

public virtual IdentityError DuplicateEmail(string email)
DuplicateRoleName(System.String)

Returns an Microsoft.AspNet.Identity.IdentityError indicating the specified role name already exists.

Arguments:
  • role (System.String) – The duplicate role.
Return type:

Microsoft.AspNet.Identity.IdentityError

Returns:

An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating the specific role <paramref name=”role” /> name already exists.

public virtual IdentityError DuplicateRoleName(string role)
DuplicateUserName(System.String)

Returns an Microsoft.AspNet.Identity.IdentityError indicating the specified userName already exists.

Arguments:
  • userName (System.String) – The user name that already exists.
Return type:

Microsoft.AspNet.Identity.IdentityError

Returns:

An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating the specified <paramref name=”userName” /> already exists.

public virtual IdentityError DuplicateUserName(string userName)
InvalidEmail(System.String)

Returns an Microsoft.AspNet.Identity.IdentityError indicating the specified email is invalid.

Arguments:
  • email (System.String) – The email that is invalid.
Return type:

Microsoft.AspNet.Identity.IdentityError

Returns:

An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating the specified <paramref name=”email” /> is invalid.

public virtual IdentityError InvalidEmail(string email)
InvalidRoleName(System.String)

Returns an Microsoft.AspNet.Identity.IdentityError indicating the specified role name is invalid.

Arguments:
  • role (System.String) – The invalid role.
Return type:

Microsoft.AspNet.Identity.IdentityError

Returns:

An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating the specific role <paramref name=”role” /> name is invalid.

public virtual IdentityError InvalidRoleName(string role)
InvalidToken()

Returns an Microsoft.AspNet.Identity.IdentityError indicating an invalid token.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating an invalid token.
public virtual IdentityError InvalidToken()
InvalidUserName(System.String)

Returns an Microsoft.AspNet.Identity.IdentityError indicating the specified user userName is invalid.

Arguments:
  • userName (System.String) – The user name that is invalid.
Return type:

Microsoft.AspNet.Identity.IdentityError

Returns:

An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating the specified user <paramref name=”userName” /> is invalid.

public virtual IdentityError InvalidUserName(string userName)
LoginAlreadyAssociated()

Returns an Microsoft.AspNet.Identity.IdentityError indicating an external login is already associated with an account.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating an external login is already associated with an account.
public virtual IdentityError LoginAlreadyAssociated()
PasswordMismatch()

Returns an Microsoft.AspNet.Identity.IdentityError indicating a password mismatch.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating a password mismatch.
public virtual IdentityError PasswordMismatch()
PasswordRequiresDigit()

Returns an Microsoft.AspNet.Identity.IdentityError indicating a password entered does not contain a numeric character, which is required by the password policy.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating a password entered does not contain a numeric character.
public virtual IdentityError PasswordRequiresDigit()
PasswordRequiresLower()

Returns an Microsoft.AspNet.Identity.IdentityError indicating a password entered does not contain a lower case letter, which is required by the password policy.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating a password entered does not contain a lower case letter.
public virtual IdentityError PasswordRequiresLower()
PasswordRequiresNonLetterAndDigit()

Returns an Microsoft.AspNet.Identity.IdentityError indicating a password entered does not contain a non-alphanumeric character, which is required by the password policy.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating a password entered does not contain a non-alphanumeric character.
public virtual IdentityError PasswordRequiresNonLetterAndDigit()
PasswordRequiresUpper()

Returns an Microsoft.AspNet.Identity.IdentityError indicating a password entered does not contain an upper case letter, which is required by the password policy.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating a password entered does not contain an upper case letter.
public virtual IdentityError PasswordRequiresUpper()
PasswordTooShort(System.Int32)

Returns an Microsoft.AspNet.Identity.IdentityError indicating a password of the specified length does not meet the minimum length requirements.

Arguments:
  • length (System.Int32) – The length that is not long enough.
Return type:

Microsoft.AspNet.Identity.IdentityError

Returns:

An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating a password of the specified <paramref name=”length” /> does not meet the minimum length requirements.

public virtual IdentityError PasswordTooShort(int length)
UserAlreadyHasPassword()

Returns an Microsoft.AspNet.Identity.IdentityError indicating a user already has a password.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating a user already has a password.
public virtual IdentityError UserAlreadyHasPassword()
UserAlreadyInRole(System.String)

Returns an Microsoft.AspNet.Identity.IdentityError indicating a user is already in the specified role.

Arguments:
  • role (System.String) – The duplicate role.
Return type:

Microsoft.AspNet.Identity.IdentityError

Returns:

An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating a user is already in the specified <paramref name=”role” />.

public virtual IdentityError UserAlreadyInRole(string role)
UserLockoutNotEnabled()

Returns an Microsoft.AspNet.Identity.IdentityError indicating user lockout is not enabled.

Return type:Microsoft.AspNet.Identity.IdentityError
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating user lockout is not enabled..
public virtual IdentityError UserLockoutNotEnabled()
UserNotInRole(System.String)

Returns an Microsoft.AspNet.Identity.IdentityError indicating a user is not in the specified role.

Arguments:
  • role (System.String) – The duplicate role.
Return type:

Microsoft.AspNet.Identity.IdentityError

Returns:

An <see cref=”T:Microsoft.AspNet.Identity.IdentityError” /> indicating a user is not in the specified <paramref name=”role” />.

public virtual IdentityError UserNotInRole(string role)