密码不是在Grails 2.2.4中编码

时间:2015-10-03 11:43:40

标签: grails spring-security

我正在尝试重置用户的密码。但密码不是编码

String salt = saltSource instanceof NullSaltSource ? null : params.username
String userPass = springSecurityUiService.encodePassword(params.password, salt)
println(userPass)  // here printing provided(123456) password directly

/* Update password */
User.executeUpdate("Update User b set b.password = " + springSecurityUiService.encodePassword(params.password, salt) + " WHERE b.personId=" + params.person.id)

redirect(controller: 'person', action: 'index')

0 个答案:

没有答案