Skip to content

Commit

Permalink
KEYCLOAK-1476 NotSerializableException: org.keycloak.models.cache.ent…
Browse files Browse the repository at this point in the history
…ities.CachedClientRole

Conflicts:
	model/api/src/main/java/org/keycloak/models/AuthenticationExecutionModel.java
  • Loading branch information
mstruk authored and stianst committed Jun 17, 2015
1 parent 9711ccd commit 0b0b101
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 14 deletions.
2 changes: 2 additions & 0 deletions core/src/main/java/org/keycloak/enums/SslRequired.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public enum SslRequired {
EXTERNAL,
NONE;

private static final long serialVersionUID = 1L;

public boolean isRequired(ClientConnection connection) {
return isRequired(connection.getRemoteAddr());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package org.keycloak.models;

import java.util.Comparator;
import java.io.Serializable;

/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class AuthenticationExecutionModel {
public class AuthenticationExecutionModel implements Serializable {
private static final long serialVersionUID = 1L;

public static class ExecutionComparator implements Comparator<AuthenticationExecutionModel> {
public static final ExecutionComparator SINGLETON = new ExecutionComparator();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package org.keycloak.models;

import java.io.Serializable;

/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class AuthenticationFlowModel {
public class AuthenticationFlowModel implements Serializable {
private static final long serialVersionUID = 1L;

private String id;
private String alias;
private String description;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package org.keycloak.models;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class AuthenticatorModel {
public class AuthenticatorModel implements Serializable {
private static final long serialVersionUID = 1L;

private String id;
private String alias;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.keycloak.models;

import java.io.Serializable;
import java.util.Map;

/**
Expand All @@ -8,7 +9,9 @@
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class IdentityProviderMapperModel {
public class IdentityProviderMapperModel implements Serializable {
private static final long serialVersionUID = 1L;

protected String id;
protected String name;
protected String identityProviderAlias;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
package org.keycloak.models;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -28,7 +29,8 @@
*
* @author Pedro Igor
*/
public class IdentityProviderModel {
public class IdentityProviderModel implements Serializable {
private static final long serialVersionUID = 1L;

private String internalId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.keycloak.models.utils.Pbkdf2PasswordEncoder;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
Expand All @@ -13,7 +14,8 @@
/**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/
public class PasswordPolicy {
public class PasswordPolicy implements Serializable {
private static final long serialVersionUID = 1L;

public static final String INVALID_PASSWORD_MIN_LENGTH_MESSAGE = "invalidPasswordMinLengthMessage";
public static final String INVALID_PASSWORD_MIN_DIGITS_MESSAGE = "invalidPasswordMinDigitsMessage";
Expand Down Expand Up @@ -153,7 +155,7 @@ public Error validate(String user, String password) {
return null;
}

private static interface Policy {
private static interface Policy extends Serializable {
public Error validate(UserModel user, String password);
public Error validate(String user, String password);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.keycloak.models;

import java.io.Serializable;
import java.util.Map;

/**
Expand All @@ -8,7 +9,9 @@
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class ProtocolMapperModel {
public class ProtocolMapperModel implements Serializable {
private static final long serialVersionUID = 1L;

protected String id;
protected String name;
protected String protocol;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.keycloak.models;

import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
Expand All @@ -8,7 +9,9 @@
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class RequiredCredentialModel {
public class RequiredCredentialModel implements Serializable {
private static final long serialVersionUID = 1L;

protected String type;
protected boolean input;
protected boolean secret;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package org.keycloak.models;

import java.io.Serializable;
import java.util.Map;

/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class UserFederationMapperModel {
public class UserFederationMapperModel implements Serializable {
private static final long serialVersionUID = 1L;

protected String id;
protected String name;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.keycloak.models;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -9,7 +10,8 @@
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
* @author <a href="mailto:bburke@redhat.com">Bill Burke</a>
*/
public class UserFederationProviderModel {
public class UserFederationProviderModel implements Serializable {
private static final long serialVersionUID = 1L;

private String id;
private String providerName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.keycloak.models.RoleModel;
import org.keycloak.models.cache.RealmCache;

import java.io.Serializable;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
Expand All @@ -19,7 +20,9 @@
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class CachedClient {
public class CachedClient implements Serializable {
private static final long serialVersionUID = 1L;

private String id;
private String clientId;
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
* @version $Revision: 1 $
*/
public class CachedClientRole extends CachedRole {

private static final long serialVersionUID = 1L;

private final String idClient;

public CachedClientRole(String idClient, RoleModel model, RealmModel realm) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.keycloak.models.cache.RealmCache;
import org.keycloak.util.MultivaluedHashMap;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
Expand All @@ -29,7 +30,8 @@
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class CachedRealm {
public class CachedRealm implements Serializable {
private static final long serialVersionUID = 1L;

private String id;
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
import org.keycloak.models.RealmModel;
import org.keycloak.models.RoleModel;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class CachedRole {
public class CachedRole implements Serializable {

private static final long serialVersionUID = 1L;

final protected String id;
final protected String name;
final protected String realm;
Expand Down

0 comments on commit 0b0b101

Please sign in to comment.