Skip to content

Commit

Permalink
fix auth scopeToProject to reflect ContainX/openstack4j#664
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleycutalo committed Mar 10, 2017
1 parent 012d671 commit f479630
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public SwiftStorageService swiftService(SwiftProperties properties) {
properties.getIdentityEndpoint(),
properties.getUsername(),
properties.getPassword(),
properties.getProjectName());
properties.getProjectName(),
properties.getDomainName());
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class SwiftProperties {
private String password;

private String projectName;
private String domainName;

public String getContainerName() {
return containerName;
Expand All @@ -54,6 +55,14 @@ public void setProjectName(String projectName) {
this.projectName = projectName;
}

public String getDomainName() {
return domainName;
}

public void setDomainName(String domainName) {
this.domainName = domainName;
}

public String getUsername() {
return username;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ public SwiftStorageService(String containerName,
String identityEndpoint,
String username,
String password,
String projectName) {

String projectName,
String domainName) {
OSClient.OSClientV3 os = OSFactory.builderV3()
.endpoint(identityEndpoint)
.credentials(username, password)
.scopeToProject(Identifier.byName(projectName))
.scopeToProject(Identifier.byName(projectName), Identifier.byName(domainName))
.authenticate();
this.swift = os.objectStorage();
this.containerName = containerName;
Expand Down

0 comments on commit f479630

Please sign in to comment.