Skip to content

Commit

Permalink
Fix commented code parts.
Browse files Browse the repository at this point in the history
  • Loading branch information
SteKoe committed Jul 3, 2019
1 parent 85c495e commit 0e2a6a9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,13 @@
@Configuration
public class SecuritySecureConfig extends WebSecurityConfigurerAdapter {
private final AdminServerProperties adminServer;

@Value("${spring.security.remember-me.timeout:1209600}")
private int REMEMBER_ME_TIMEOUT;

@Value("${spring.security.remember-me.token:#{rememberMeTokenGenerator}}")
private String REMEMBER_ME_TOKEN;
private final int REMEMBER_ME_TIMEOUT = 1209600;
private final String REMEMBER_ME_TOKEN = UUID.randomUUID().toString();

public SecuritySecureConfig(AdminServerProperties adminServer) {
this.adminServer = adminServer;
}

@Bean
public String rememberMeTokenGenerator() {
return UUID.randomUUID().toString();
}

@Override
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
Expand Down
2 changes: 1 addition & 1 deletion spring-boot-admin-server-ui/src/main/frontend/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h1 class="title has-text-primary">Spring Boot Admin</h1>
data-i18n="placeholder:login.placeholder.password" th:classappend="${param.error != null} ? is-danger">
</div>
</div>
<div class="field">
<div class="field" th:if="${uiSettings.rememberMeEnabled}">
<div class="control">
<label class="checkbox">
<input type="checkbox" name="remember-me">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import merge from 'lodash/merge';
const DEFAULT_CONFIG = {
uiSettings: {
brand: '<img src="assets/img/icon-spring-boot-admin.svg"><span>Spring Boot Admin</span>',
rememberMeEnabled: true,
externalViews: [],
favicon: 'assets/img/favicon.png',
faviconDanger: 'assets/img/favicon-danger.png',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public static class Settings {
private final String favicon;
private final String faviconDanger;
private final boolean notificationFilterEnabled;
private final boolean rememberMeEnabled;
private final List<String> routes;
private final List<ExternalView> externalViews;
}
Expand Down

0 comments on commit 0e2a6a9

Please sign in to comment.