From 89c515175b3c6f11989ac981df320dd700965f05 Mon Sep 17 00:00:00 2001 From: Ioannis Kakavas Date: Thu, 29 Nov 2018 13:28:45 +0200 Subject: [PATCH] Update version for authenticate API responses This commits changes the serialization version from V_7_0_0 to v_6_6_0 for the authenticate API response now that the work to add the realm info in the response has been backported to 6.x in b515ec7c9b9074dfa2f5fd28bac68fd8a482209e Relates #35648 --- .../xpack/core/security/action/user/AuthenticateResponse.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateResponse.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateResponse.java index 45a99265b11..06a4df019c3 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateResponse.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/AuthenticateResponse.java @@ -31,7 +31,7 @@ public class AuthenticateResponse extends ActionResponse { @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); - if (out.getVersion().before(Version.V_7_0_0)) { + if (out.getVersion().before(Version.V_6_6_0)) { User.writeTo(authentication.getUser(), out); } else { authentication.writeTo(out); @@ -41,7 +41,7 @@ public class AuthenticateResponse extends ActionResponse { @Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); - if (in.getVersion().before(Version.V_7_0_0)) { + if (in.getVersion().before(Version.V_6_6_0)) { final User user = User.readFrom(in); final Authentication.RealmRef unknownRealm = new Authentication.RealmRef("__unknown", "__unknown", "__unknown"); authentication = new Authentication(user, unknownRealm, unknownRealm);