Browse Source

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
Ioannis Kakavas 6 years ago
parent
commit
89c515175b

+ 2 - 2
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);