This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch jpa2-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/causeway-app-helloworld.git
The following commit(s) were added to refs/heads/jpa2-SNAPSHOT by this push:
new c6a1990 use Spring's bcrypt PasswordEncoder
c6a1990 is described below
commit c6a1990408ef837e909a454a32065210be992ce6
Author: Andi Huber <[email protected]>
AuthorDate: Thu Mar 21 13:40:58 2024 +0100
use Spring's bcrypt PasswordEncoder
---
src/main/java/domainapp/webapp/AppManifest.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/main/java/domainapp/webapp/AppManifest.java
b/src/main/java/domainapp/webapp/AppManifest.java
index 3d274c7..031ab2c 100644
--- a/src/main/java/domainapp/webapp/AppManifest.java
+++ b/src/main/java/domainapp/webapp/AppManifest.java
@@ -7,6 +7,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import
org.apache.causeway.applib.CausewayModuleApplibChangeAndExecutionLoggers;
@@ -44,6 +45,11 @@ import domainapp.modules.hello.HelloWorldModule;
})
public class AppManifest {
+ @Bean
+ public PasswordEncoder encoder() {
+ return new BCryptPasswordEncoder();
+ }
+
/**
* Sets up a simple in-memory authentication/authorization realm.
* <p>