Skip to content

Commit b5a6dbc

Browse files
committed
work
1 parent 50af74a commit b5a6dbc

File tree

3 files changed

+5
-31
lines changed

3 files changed

+5
-31
lines changed

src/main/java/org/woehlke/java/simpleworklist/config/SimpleworklistProperties.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import org.springframework.validation.annotation.Validated;
88

99
import javax.validation.Valid;
10-
import javax.validation.constraints.NotBlank;
1110
import 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
}

src/main/java/org/woehlke/java/simpleworklist/config/WebMvcConfig.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
2020
import org.thymeleaf.dialect.springdata.SpringDataDialect;
2121

22+
import javax.validation.constraints.NotNull;
2223
import java.util.Locale;
2324
import 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);

src/main/java/org/woehlke/java/simpleworklist/config/WebSecurityConfig.java

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)