File tree Expand file tree Collapse file tree 3 files changed +5
-31
lines changed
src/main/java/org/woehlke/java/simpleworklist/config Expand file tree Collapse file tree 3 files changed +5
-31
lines changed Original file line number Diff line number Diff line change 77import org .springframework .validation .annotation .Validated ;
88
99import javax .validation .Valid ;
10- import javax .validation .constraints .NotBlank ;
1110import javax .validation .constraints .NotNull ;
1211
1312@ Component
@@ -126,14 +125,6 @@ public static class WebSecurity {
126125 @ NotNull
127126 private Integer strengthBCryptPasswordEncoder ;
128127
129- /*
130- @NotNull
131- private Integer hashWidth;
132-
133- @NotBlank
134- private String secret;
135- */
136-
137128 }
138129
139130}
Original file line number Diff line number Diff line change 1919import org .springframework .web .servlet .i18n .SessionLocaleResolver ;
2020import org .thymeleaf .dialect .springdata .SpringDataDialect ;
2121
22+ import javax .validation .constraints .NotNull ;
2223import java .util .Locale ;
2324import java .util .Properties ;
2425
@@ -102,16 +103,16 @@ public MethodValidationPostProcessor methodValidationPostProcessor() {
102103 return new MethodValidationPostProcessor ();
103104 }
104105
105- public void addInterceptors (InterceptorRegistry registry ) {
106+ public void addInterceptors (@ NotNull InterceptorRegistry registry ) {
106107 registry .addInterceptor (localeChangeInterceptor ());
107108 }
108109
109- public void addViewControllers (ViewControllerRegistry registry ) {
110+ public void addViewControllers (@ NotNull ViewControllerRegistry registry ) {
110111 registry .addViewController ("/" ).setViewName ("redirect:/taskstate/inbox" );
111112 registry .addViewController ("/home" ).setViewName ("redirect:/taskstate/inbox" );
112113 }
113114
114- public void addResourceHandlers (ResourceHandlerRegistry registry ) {
115+ public void addResourceHandlers (@ NotNull ResourceHandlerRegistry registry ) {
115116 for (String h : simpleworklistProperties .getWebMvc ().getStaticResourceHandler ()){
116117 String location = "classpath:/static" +h +"/" ;
117118 registry .addResourceHandler (h +"/*" ).addResourceLocations (location );
Original file line number Diff line number Diff line change @@ -54,16 +54,6 @@ public WebSecurityConfig(
5454 this .simpleworklistProperties = simpleworklistProperties ;
5555 }
5656
57- /*
58- @Override
59- public void init(WebSecurity builder) throws Exception {
60-
61- }
62- @Override
63- public void configure(WebSecurity builder) throws Exception {
64- }
65- */
66-
6757 @ Override
6858 protected void configure (HttpSecurity http ) throws Exception {
6959 http
@@ -102,21 +92,13 @@ public UserDetailsService userDetailsService(){
10292 }
10393
10494 /**
105- * https://bcrypt-generator.com/
95+ * @see <a href=" https://bcrypt-generator.com/">bcrypt-generator.com</a>
10696 * @return PasswordEncoder encoder
10797 */
10898 @ Bean
10999 public PasswordEncoder encoder (){
110100 int strength = simpleworklistProperties .getWebSecurity ().getStrengthBCryptPasswordEncoder ();
111101 return new BCryptPasswordEncoder (strength );
112- /*
113- CharSequence secret=this.simpleworklistProperties.getWebSecurity().getSecret();
114- int iterations=this.simpleworklistProperties.getWebSecurity().getIterations();
115- int hashWidth=this.simpleworklistProperties.getWebSecurity().getHashWidth();
116- Pbkdf2PasswordEncoder encoder = (new Pbkdf2PasswordEncoder(secret,iterations,hashWidth));
117- encoder.setEncodeHashAsBase64(true);
118- return encoder;
119- */
120102 }
121103
122104 @ Bean
You can’t perform that action at this time.
0 commit comments