Spring安全性没有密码编码 [英] Spring security no password encoding

查看:148
本文介绍了Spring安全性没有密码编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Spring Security中关闭密码编码?如果是这样,怎么样?

Would it be possible to turn off password encoding in Spring Security? If so, how?

推荐答案

这是一个非常糟糕的主意,但如果你有一个用例,那么它是可行的。覆盖 grails-app / conf / spring / resources.groovy 中的 passwordEncoder bean:

It's a really really bad idea in general, but if you have a use case for it then it is doable. Override the passwordEncoder bean in grails-app/conf/spring/resources.groovy:

import org.springframework.security.authentication.encoding.PlaintextPasswordEncoder

beans = {
   passwordEncoder(PlaintextPasswordEncoder)
}

这篇关于Spring安全性没有密码编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆