Skip to content

Commit 54b6363

Browse files
codebrainrusscam
authored andcommitted
Add realm information for Authenticate API (#3725)
Add realm information for Authenticate API
1 parent 65f64ce commit 54b6363

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/Nest/XPack/Security/Authenticate/AuthenticateResponse.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ public interface IAuthenticateResponse : IResponse
1919

2020
[JsonProperty("username")]
2121
string Username { get; }
22+
23+
[JsonProperty("authentication_realm")]
24+
RealmInfo AuthenticationRealm { get; }
25+
26+
[JsonProperty("lookup_realm")]
27+
RealmInfo LookupRealm { get; }
2228
}
2329

2430
public class AuthenticateResponse : ResponseBase, IAuthenticateResponse
@@ -30,6 +36,20 @@ public class AuthenticateResponse : ResponseBase, IAuthenticateResponse
3036
public IReadOnlyDictionary<string, object> Metadata { get; internal set; } = EmptyReadOnly<string, object>.Dictionary;
3137

3238
public IReadOnlyCollection<string> Roles { get; internal set; } = EmptyReadOnly<string>.Collection;
39+
3340
public string Username { get; internal set; }
41+
42+
public RealmInfo AuthenticationRealm { get; internal set; }
43+
44+
public RealmInfo LookupRealm { get; internal set; }
45+
}
46+
47+
public class RealmInfo
48+
{
49+
[JsonProperty("name")]
50+
public string Name { get; internal set; }
51+
52+
[JsonProperty("type")]
53+
public string Type { get; internal set; }
3454
}
3555
}

0 commit comments

Comments
 (0)