Skip to content

Instantly share code, notes, and snippets.

@TheAngryByrd
Created October 1, 2015 19:58
Show Gist options
  • Select an option

  • Save TheAngryByrd/3f40a8fc2a8111cd4dd8 to your computer and use it in GitHub Desktop.

Select an option

Save TheAngryByrd/3f40a8fc2a8111cd4dd8 to your computer and use it in GitHub Desktop.
IdentityResult.fs
type Rop<'TSuccess,'TError> =
| Pass of 'TSuccess
| Fail of 'TError list
type IdentityError = { Code : string; Message: string; }
type UserAuthErrors<'CustomError> =
| DefaultError of IdentityError
| ConcurrencyFailure of IdentityError
| PasswordMismatch of IdentityError
| InvalidToken of IdentityError
| LoginAlreadyAssociated of IdentityError
| InvalidUserName of IdentityError
| InvalidEmail of IdentityError
| DuplicateUserName of IdentityError
| DuplicateEmail of IdentityError
| InvalidRoleName of IdentityError
| DuplicateRoleName of IdentityError
| UserAlreadyHasPassword of IdentityError
| UserLockoutNotEnabled of IdentityError
| UserAlreadyInRole of IdentityError
| UserNotInRole of IdentityError
| PasswordTooShort of IdentityError
| PasswordRequiresNonLetterAndDigit of IdentityError
| PasswordRequiresDigit of IdentityError
| PasswordRequiresLower of IdentityError
| PasswordRequiresUpper of IdentityError
| Exception of exn
| CustomError of 'CustomError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment