changes to support single-sign-on (sso)
parent
80acc01418
commit
0ecdfc2661
|
@ -78,16 +78,21 @@ public class SingleSignOnEntry implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeObjectData(ObjectOutputStream out) throws IOException {
|
public void writeObjectData(ObjectOutputStream out) throws IOException {
|
||||||
out.defaultWriteObject();
|
ObjectOutputStream outputStream = new ObjectOutputStream(out);
|
||||||
out.writeBoolean(true);
|
if (this.principal instanceof Serializable) {
|
||||||
out.writeObject(this.principal);
|
outputStream.writeBoolean(true);
|
||||||
|
outputStream.writeObject(this.principal);
|
||||||
|
} else {
|
||||||
|
outputStream.writeBoolean(false);
|
||||||
|
}
|
||||||
|
outputStream.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readObjectData(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
public void readObjectData(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||||
in.defaultReadObject();
|
ObjectInputStream inputStream = new ObjectInputStream(in);
|
||||||
boolean hasPrincipal = in.readBoolean();
|
boolean hasPrincipal = inputStream.readBoolean();
|
||||||
if (hasPrincipal) {
|
if (hasPrincipal) {
|
||||||
this.principal = (Principal) in.readObject();
|
this.principal = (Principal) inputStream.readObject();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue