KEYCLOAK-1070 ClientModel.setName/getName

This commit is contained in:
mposolda committed 2015-04-23 18:21:21 +02:00
1 parent 535023d800
commit c942a8ac4f
36 files changed
+330 -50

No files matched your search

@@ -293,7 +293,7 @@ public class ClientAdapter implements ClientModel {
@Override
public String getClientId() {
if (updated != null) return updated.getClientId();
return cached.getName();
return cached.getClientId();
}
@Override
@@ -303,6 +303,18 @@ public class ClientAdapter implements ClientModel {
cacheSession.registerRealmInvalidation(cachedRealm.getId());
}
@Override
public String getName() {
if (updated != null) return updated.getName();
return cached.getName();
}
@Override
public void setName(String name) {
getDelegateForUpdate();
updated.setName(name);
}
@Override
public boolean isSurrogateAuthRequired() {
if (updated != null) return updated.isSurrogateAuthRequired();
@@ -21,6 +21,7 @@ import java.util.TreeMap;
*/
public class CachedClient {
private String id;
private String clientId;
private String name;
private String realm;
private Set<String> redirectUris = new HashSet<String>();
@@ -49,7 +50,8 @@ public class CachedClient {
public CachedClient(RealmCache cache, RealmProvider delegate, RealmModel realm, ClientModel model) {
id = model.getId();
secret = model.getSecret();
name = model.getClientId();
clientId = model.getClientId();
name = model.getName();
this.realm = realm.getId();
enabled = model.isEnabled();
protocol = model.getProtocol();
@@ -85,6 +87,10 @@ public class CachedClient {
return id;
}
public String getClientId() {
return clientId;
}
public String getName() {
return name;
}