mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
feat: Add bcrypt encrypted password type (#386)
* Add loading and countdown status to the verification code sending button
* Add bcrypt encrypted password type
* Revert "Add loading and countdown status to the verification code sending button"
This reverts commit 782b9e229a
.
* Update bcrypt.go
* Update go.sum
This commit is contained in:
@ -15,7 +15,8 @@
|
||||
package cred
|
||||
|
||||
type CredManager interface {
|
||||
GetSealedPassword(password string, userSalt string, organizationSalt string) string
|
||||
GetHashedPassword(password string, userSalt string, organizationSalt string) string
|
||||
IsPasswordCorrect(password string, passwordHash string, userSalt string, organizationSalt string) bool
|
||||
}
|
||||
|
||||
func GetCredManager(passwordType string) CredManager {
|
||||
@ -25,7 +26,8 @@ func GetCredManager(passwordType string) CredManager {
|
||||
return NewSha256SaltCredManager()
|
||||
} else if passwordType == "md5-salt" {
|
||||
return NewMd5UserSaltCredManager()
|
||||
} else if passwordType == "bcrypt" {
|
||||
return NewBcryptCredManager()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user