Created
March 18, 2019 20:12
-
-
Save sedkis/6392c853c0f5f1b4865056c6fb2e29bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebSecurity | |
public class WebSecurityConfig extends WebSecurityConfigurerAdapter { | |
private String apiUser; | |
private String apiPassword; | |
@Autowired | |
public WebSecurityConfig( | |
@Value("${web.security.api.user}") String apiUser, // stored in plain text in application.properties | |
@Value("${web.security.api.password}") String apiPassword) // no reference in plaintext | |
{ | |
this.apiUser = apiUser; | |
this.apiPassword = apiPassword; | |
} | |
..... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment