diff --git a/src/Nest/XPack/Security/Authenticate/AuthenticateResponse.cs b/src/Nest/XPack/Security/Authenticate/AuthenticateResponse.cs index cd856b978c1..a933b7977eb 100644 --- a/src/Nest/XPack/Security/Authenticate/AuthenticateResponse.cs +++ b/src/Nest/XPack/Security/Authenticate/AuthenticateResponse.cs @@ -19,6 +19,12 @@ public interface IAuthenticateResponse : IResponse [JsonProperty("username")] string Username { get; } + + [JsonProperty("authentication_realm")] + RealmInfo AuthenticationRealm { get; } + + [JsonProperty("lookup_realm")] + RealmInfo LookupRealm { get; } } public class AuthenticateResponse : ResponseBase, IAuthenticateResponse @@ -30,6 +36,20 @@ public class AuthenticateResponse : ResponseBase, IAuthenticateResponse public IReadOnlyDictionary Metadata { get; internal set; } = EmptyReadOnly.Dictionary; public IReadOnlyCollection Roles { get; internal set; } = EmptyReadOnly.Collection; + public string Username { get; internal set; } + + public RealmInfo AuthenticationRealm { get; internal set; } + + public RealmInfo LookupRealm { get; internal set; } + } + + public class RealmInfo + { + [JsonProperty("name")] + public string Name { get; internal set; } + + [JsonProperty("type")] + public string Type { get; internal set; } } }