Do not store RealmModel in cache entries
Closes #33439 Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
This commit is contained in:
parent
df89606b06
commit
3887ee3006
3 changed files with 8 additions and 12 deletions
|
@ -23,18 +23,18 @@ import org.keycloak.models.cache.infinispan.entities.InRealm;
|
|||
|
||||
public class CachedIdentityProvider extends AbstractRevisioned implements InRealm {
|
||||
|
||||
private final RealmModel realm;
|
||||
private final String realm;
|
||||
private final IdentityProviderModel idp;
|
||||
|
||||
public CachedIdentityProvider(Long revision, RealmModel realm, String cacheKey, IdentityProviderModel idp) {
|
||||
super(revision, cacheKey);
|
||||
this.realm = realm;
|
||||
this.realm = realm.getId();
|
||||
this.idp = idp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRealm() {
|
||||
return realm.getId();
|
||||
return realm;
|
||||
}
|
||||
|
||||
public IdentityProviderModel getIdentityProvider() {
|
||||
|
|
|
@ -23,18 +23,18 @@ import org.keycloak.models.cache.infinispan.entities.InRealm;
|
|||
|
||||
public class CachedIdentityProviderMapper extends AbstractRevisioned implements InRealm {
|
||||
|
||||
private final RealmModel realm;
|
||||
private final String realm;
|
||||
private final IdentityProviderMapperModel mapper;
|
||||
|
||||
public CachedIdentityProviderMapper(Long revision, RealmModel realm, String cacheKey, IdentityProviderMapperModel mapper) {
|
||||
super(revision, cacheKey);
|
||||
this.realm = realm;
|
||||
this.realm = realm.getId();
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRealm() {
|
||||
return realm.getId();
|
||||
return realm;
|
||||
}
|
||||
|
||||
public IdentityProviderMapperModel getIdentityProviderMapper() {
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.keycloak.models.cache.infinispan.entities.InRealm;
|
|||
|
||||
public class CachedOrganization extends AbstractRevisioned implements InRealm {
|
||||
|
||||
private final RealmModel realm;
|
||||
private final String realm;
|
||||
private final String name;
|
||||
private final String alias;
|
||||
private final String description;
|
||||
|
@ -43,7 +43,7 @@ public class CachedOrganization extends AbstractRevisioned implements InRealm {
|
|||
|
||||
public CachedOrganization(Long revision, RealmModel realm, OrganizationModel organization) {
|
||||
super(revision, organization.getId());
|
||||
this.realm = realm;
|
||||
this.realm = realm.getId();
|
||||
this.name = organization.getName();
|
||||
this.alias = organization.getAlias();
|
||||
this.description = organization.getDescription();
|
||||
|
@ -55,10 +55,6 @@ public class CachedOrganization extends AbstractRevisioned implements InRealm {
|
|||
|
||||
@Override
|
||||
public String getRealm() {
|
||||
return realm.getId();
|
||||
}
|
||||
|
||||
public RealmModel getRealmModel() {
|
||||
return realm;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue