added default prop values
This commit is contained in:
@@ -10,13 +10,13 @@ import org.springframework.context.annotation.Configuration;
|
||||
@ComponentScan
|
||||
public class AcsClientConfiguration {
|
||||
|
||||
@Value("${content.service.baseUrl}")
|
||||
@Value("${content.service.baseUrl:http://localhost:8080/alfresco}")
|
||||
private String baseUrl;
|
||||
|
||||
@Value("${content.service.security.basicAuth.username}")
|
||||
@Value("${content.service.security.basicAuth.username:admin}")
|
||||
private String basicAuthUsername;
|
||||
|
||||
@Value("${content.service.security.basicAuth.password}")
|
||||
@Value("${content.service.security.basicAuth.password:admin}")
|
||||
private String basicAuthPassword;
|
||||
|
||||
@Value("${content.service.security.accessToken}")
|
||||
@@ -27,10 +27,10 @@ public class AcsClientConfiguration {
|
||||
}
|
||||
|
||||
public void authorize(Client client) {
|
||||
if (this.basicAuthUsername != null) {
|
||||
client.register(new BasicAuthRequestFilter(this.basicAuthUsername, this.basicAuthPassword));
|
||||
} else if (this.accessToken != null) {
|
||||
if (this.accessToken != null) {
|
||||
client.register(new AccessTokenRequestFilter(this.accessToken));
|
||||
} else if (this.basicAuthUsername != null) {
|
||||
client.register(new BasicAuthRequestFilter(this.basicAuthUsername, this.basicAuthPassword));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user