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 0e2a6a9 commit ccd0d26
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Expand Up @@ -19,8 +19,7 @@
import de.codecentric.boot.admin.server.config.AdminServerProperties;

import java.util.UUID;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
Expand All @@ -34,8 +33,6 @@
@Configuration
public class SecuritySecureConfig extends WebSecurityConfigurerAdapter {
private final AdminServerProperties adminServer;
private final int REMEMBER_ME_TIMEOUT = 1209600;
private final String REMEMBER_ME_TOKEN = UUID.randomUUID().toString();

public SecuritySecureConfig(AdminServerProperties adminServer) {
this.adminServer = adminServer;
Expand Down Expand Up @@ -63,7 +60,7 @@ protected void configure(HttpSecurity http) throws Exception {
this.adminServer.path("/actuator/**") // <7>
)
.and()
.rememberMe().key(REMEMBER_ME_TOKEN).tokenValiditySeconds(REMEMBER_ME_TIMEOUT);
.rememberMe().key(UUID.randomUUID().toString()).tokenValiditySeconds(1209600);
// @formatter:on
}

Expand Down
Expand Up @@ -89,6 +89,7 @@ public UiController homeUiController() throws IOException {
.notificationFilterEnabled(!this.applicationContext.getBeansOfType(
NotificationFilterController.class).isEmpty())
.routes(routes)
.rememberMeEnabled(this.adminUi.isRememberMeEnabled())
.externalViews(this.adminUi.getExternalViews())
.build();

Expand Down
Expand Up @@ -91,6 +91,11 @@ public class AdminServerUiProperties {
*/
private List<UiController.ExternalView> externalViews = new ArrayList<>();

/**
* Whether the option to remember a user should be available.
*/
private boolean rememberMeEnabled = true;

@lombok.Data
public static class Cache {

Expand Down

0 comments on commit ccd0d26

Please sign in to comment.