update CheckPassword

This commit is contained in:
regnersen 2024-01-14 02:36:23 +07:00
parent a1e5a1092b
commit b3d38cabb9

View file

@ -43,17 +43,13 @@ func (storage BlockchainStorage) Delete(id string) (err error) {
func (storage BlockchainStorage) CheckPassword(id string, secret util.Uint256) (bool, error) {
_, err := storage.contract.CheckUser(id, secret)
if err == nil {
return true, nil
}
if err.Error() == "Password hashes does not match" {
return false, nil
}
if err != nil {
return false, err
}
return true, nil
}
func main() {
manager := manage.NewDefaultManager()
manager.SetAuthorizeCodeTokenCfg(manage.DefaultAuthorizeCodeTokenCfg)