Fix sending domain name in swift-client
This patch fixes the domain_name parameter which is sent incorrectly when using Identity API V3 for swift authentication Change-Id: Ide155d425216a08c1c4d23af7f7bb5496ef4edd3 Closes-Bug: #1540274
This commit is contained in:
parent
69a30cd3b2
commit
a1e4d4ebbe
|
@ -47,7 +47,7 @@ public class PasswordAuthenticationRequestV3 extends AuthenticationRequestV3 {
|
|||
public PasswordAuthenticationRequestV3(String projectName,
|
||||
PasswordCredentialsV3 passwordCreds) {
|
||||
this(projectName == null ? null :
|
||||
new ScopeWrapper(new ProjectWrapper(projectName)),
|
||||
new ScopeWrapper(new ProjectWrapper(projectName, passwordCreds.domain)),
|
||||
passwordCreds);
|
||||
}
|
||||
|
||||
|
@ -135,9 +135,8 @@ public class PasswordAuthenticationRequestV3 extends AuthenticationRequestV3 {
|
|||
private final String name;
|
||||
private final Map<String, String> domain;
|
||||
|
||||
public ProjectWrapper(String projectName) {
|
||||
this.domain = new HashMap();
|
||||
this.domain.put("id", "default");
|
||||
public ProjectWrapper(String projectName, Map<String, String> domain) {
|
||||
this.domain = domain;
|
||||
this.name = projectName;
|
||||
}
|
||||
|
||||
|
|
|
@ -515,7 +515,7 @@ public final class SwiftRestClient {
|
|||
if (trust_id == null) {
|
||||
if (password != null) {
|
||||
authRequest = new PasswordAuthenticationRequestV3(tenant,
|
||||
new PasswordCredentialsV3(username, password, null));
|
||||
new PasswordCredentialsV3(username, password, domain_name));
|
||||
} else {
|
||||
authRequest = new TokenAuthenticationRequestV3(apiKey);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue