Separate resource id from client id
This commit is contained in:
@@ -82,7 +82,7 @@ public class CloudfoundryResourceConfiguration {
|
||||
@Override
|
||||
public void configure(ResourceServerSecurityConfigurer resources)
|
||||
throws Exception {
|
||||
resources.resourceId(resource.getClientId());
|
||||
resources.resourceId(resource.getResourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,6 +33,8 @@ public class CloudfoundryResourceProperties implements Validator {
|
||||
|
||||
private String serviceId = "resource";
|
||||
|
||||
private String id;
|
||||
|
||||
@Value("${vcap.services.${cloudfoundry.resource.serviceId:resource}.credentials.clientId:}")
|
||||
private String clientId;
|
||||
|
||||
@@ -60,4 +62,8 @@ public class CloudfoundryResourceProperties implements Validator {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getResourceId() {
|
||||
return id==null ? clientId : id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user