Skip to content

Commit 977d5fc

Browse files
committed
MC-30191: Keystone does not allow the type anymore for use/password auth
1 parent 91c103f commit 977d5fc

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
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: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public KeystoneAuth(String userId, String password) {
5151
public KeystoneAuth(String user, String password, Identifier domain, AuthScope scope) {
5252
this.identity = AuthIdentity.createCredentialType(user, password, domain);
5353
this.scope = scope;
54-
this.type = Type.CREDENTIALS;
5554
}
5655

5756
public KeystoneAuth(AuthScope scope, Type type) {
@@ -200,13 +199,15 @@ public AuthUser(String username, String password, Identifier domainIdentifier) {
200199
this.password = password;
201200
if (domainIdentifier != null) {
202201
domain = new AuthDomain();
203-
if (domainIdentifier.isTypeID())
204-
domain.setId(domainIdentifier.getId());
205-
else
206-
domain.setName(domainIdentifier.getId());
202+
if (domainIdentifier.isTypeID()) {
203+
domain.setId(domainIdentifier.getId());
204+
} else {
205+
domain.setName(domainIdentifier.getId());
206+
}
207207
setName(username);
208-
} else
209-
setId(username);
208+
} else {
209+
setId(username);
210+
}
210211
}
211212

212213
@Override
@@ -342,10 +343,11 @@ public static final class AuthDomain extends BasicResourceEntity implements Doma
342343
private String name;
343344

344345
public AuthDomain(Identifier domain) {
345-
if (domain.isTypeID())
346-
this.id = domain.getId();
347-
else
348-
this.name = domain.getId();
346+
if (domain.isTypeID()) {
347+
this.id = domain.getId();
348+
} else {
349+
this.name = domain.getId();
350+
}
349351
}
350352

351353
@Override

0 commit comments

Comments
 (0)