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 7
7
import org .springframework .validation .annotation .Validated ;
8
8
9
9
import javax .validation .Valid ;
10
- import javax .validation .constraints .NotBlank ;
11
10
import javax .validation .constraints .NotNull ;
12
11
13
12
@ Component
@@ -126,14 +125,6 @@ public static class WebSecurity {
126
125
@ NotNull
127
126
private Integer strengthBCryptPasswordEncoder ;
128
127
129
- /*
130
- @NotNull
131
- private Integer hashWidth;
132
-
133
- @NotBlank
134
- private String secret;
135
- */
136
-
137
128
}
138
129
139
130
}
Original file line number Diff line number Diff line change 19
19
import org .springframework .web .servlet .i18n .SessionLocaleResolver ;
20
20
import org .thymeleaf .dialect .springdata .SpringDataDialect ;
21
21
22
+ import javax .validation .constraints .NotNull ;
22
23
import java .util .Locale ;
23
24
import java .util .Properties ;
24
25
@@ -102,16 +103,16 @@ public MethodValidationPostProcessor methodValidationPostProcessor() {
102
103
return new MethodValidationPostProcessor ();
103
104
}
104
105
105
- public void addInterceptors (InterceptorRegistry registry ) {
106
+ public void addInterceptors (@ NotNull InterceptorRegistry registry ) {
106
107
registry .addInterceptor (localeChangeInterceptor ());
107
108
}
108
109
109
- public void addViewControllers (ViewControllerRegistry registry ) {
110
+ public void addViewControllers (@ NotNull ViewControllerRegistry registry ) {
110
111
registry .addViewController ("/" ).setViewName ("redirect:/taskstate/inbox" );
111
112
registry .addViewController ("/home" ).setViewName ("redirect:/taskstate/inbox" );
112
113
}
113
114
114
- public void addResourceHandlers (ResourceHandlerRegistry registry ) {
115
+ public void addResourceHandlers (@ NotNull ResourceHandlerRegistry registry ) {
115
116
for (String h : simpleworklistProperties .getWebMvc ().getStaticResourceHandler ()){
116
117
String location = "classpath:/static" +h +"/" ;
117
118
registry .addResourceHandler (h +"/*" ).addResourceLocations (location );
Original file line number Diff line number Diff line change @@ -54,16 +54,6 @@ public WebSecurityConfig(
54
54
this .simpleworklistProperties = simpleworklistProperties ;
55
55
}
56
56
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
-
67
57
@ Override
68
58
protected void configure (HttpSecurity http ) throws Exception {
69
59
http
@@ -102,21 +92,13 @@ public UserDetailsService userDetailsService(){
102
92
}
103
93
104
94
/**
105
- * https://bcrypt-generator.com/
95
+ * @see <a href=" https://bcrypt-generator.com/">bcrypt-generator.com</a>
106
96
* @return PasswordEncoder encoder
107
97
*/
108
98
@ Bean
109
99
public PasswordEncoder encoder (){
110
100
int strength = simpleworklistProperties .getWebSecurity ().getStrengthBCryptPasswordEncoder ();
111
101
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
- */
120
102
}
121
103
122
104
@ Bean
You can’t perform that action at this time.
0 commit comments