November 2017
Intermediate to advanced
542 pages
14h 24m
English
As illustrated in the following diagram, when a user submits a password, Spring Security hashes the submitted password and then compares that against the unhashed password in the database:

This means that users cannot log in to our application. To fix this, we will update the SQL that is loaded at startup time to update the passwords to be the hashed values. Update the DataSourceConfig.java file, as follows:
//src/main/java/com/packtpub/springsecurity/configuration/DataSourceConfig.java @Bean public DataSource dataSource() { return new EmbeddedDatabaseBuilder() .setName("dataSource") .setType(EmbeddedDatabaseType.H2) ...Read now
Unlock full access