Как в Grails 3.0 указать, что Spring Boot Security должен использовать BCrypt для кодирования паролей?
Следующие строки должны дать представление о том, что, по моему мнению, необходимо сделать (но я в основном просто догадываюсь):
import org.springframework.security.crypto.password.PasswordEncoder
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
PasswordEncoder passwordEncoder
passwordEncoder(BCryptPasswordEncoder)
Мое приложение загружает spring-boot-starter-security
как зависимость:
build.gradle
dependencies {
...
compile "org.springframework.boot:spring-boot-starter-security"
И у меня есть служба, подключенная к userDetailsService
, с использованием:
conf/spring/resources.groovy
import com.example.GormUserDetailsService
import com.example.SecurityConfig
beans = {
webSecurityConfiguration(SecurityConfig)
userDetailsService(GormUserDetailsService)
}