Skip to content

Commit e76fc38

Browse files
authored
Merge pull request #9 from cloudops/bug/MC-30191-OpenStackAuthenticationFailureWithKeystone
MC-30191: Keystone does not allow the type anymore for use/password auth
2 parents 91c103f + 75e54b2 commit e76fc38

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</parent>
77
<modelVersion>4.0.0</modelVersion>
88
<artifactId>openstack4j-core</artifactId>
9-
<version>co-3.12.2</version>
9+
<version>co-3.12.3</version>
1010
<name>OpenStack4j Core</name>
1111
<description>OpenStack Java API</description>
1212
<url>https://github.com/openstack4j/openstack4j/</url>

core/src/main/java/org/openstack4j/openstack/identity/v3/domain/KeystoneAuth.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ protected KeystoneAuth(Type type) {
6363
this.type = type;
6464
}
6565

66+
@JsonIgnore
6667
public Type getType() {
6768
return type;
6869
}
@@ -200,13 +201,15 @@ public AuthUser(String username, String password, Identifier domainIdentifier) {
200201
this.password = password;
201202
if (domainIdentifier != null) {
202203
domain = new AuthDomain();
203-
if (domainIdentifier.isTypeID())
204-
domain.setId(domainIdentifier.getId());
205-
else
206-
domain.setName(domainIdentifier.getId());
204+
if (domainIdentifier.isTypeID()) {
205+
domain.setId(domainIdentifier.getId());
206+
} else {
207+
domain.setName(domainIdentifier.getId());
208+
}
207209
setName(username);
208-
} else
209-
setId(username);
210+
} else {
211+
setId(username);
212+
}
210213
}
211214

212215
@Override
@@ -342,10 +345,11 @@ public static final class AuthDomain extends BasicResourceEntity implements Doma
342345
private String name;
343346

344347
public AuthDomain(Identifier domain) {
345-
if (domain.isTypeID())
346-
this.id = domain.getId();
347-
else
348-
this.name = domain.getId();
348+
if (domain.isTypeID()) {
349+
this.id = domain.getId();
350+
} else {
351+
this.name = domain.getId();
352+
}
349353
}
350354

351355
@Override

0 commit comments

Comments
 (0)