Skip to content

Commit 5ce3047

Browse files
committed
Update token response
1 parent 8c367a9 commit 5ce3047

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

src/Nest/XPack/Security/User/GetUserAccessToken/GetUserAccessTokenResponse.cs

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,35 @@ public class GetUserAccessTokenResponse : ResponseBase
2121
public string Type { get; set; }
2222

2323
[DataMember(Name = "authentication")]
24-
public AuthenticateResponse Authentication { get; set; }
24+
public Authentication Authentication { get; set; }
25+
}
26+
27+
public class Authentication : ResponseBase
28+
{
29+
[DataMember(Name = "email")]
30+
public string Email { get; internal set; }
31+
32+
[DataMember(Name = "full_name")]
33+
public string FullName { get; internal set; }
34+
35+
[DataMember(Name = "metadata")]
36+
public IReadOnlyDictionary<string, object> Metadata { get; internal set; }
37+
= EmptyReadOnly<string, object>.Dictionary;
38+
39+
[DataMember(Name = "roles")]
40+
public IReadOnlyCollection<string> Roles { get; internal set; }
41+
= EmptyReadOnly<string>.Collection;
42+
43+
[DataMember(Name = "username")]
44+
public string Username { get; internal set; }
45+
46+
[DataMember(Name = "authentication_realm")]
47+
public RealmInfo AuthenticationRealm { get; internal set; }
48+
49+
[DataMember(Name = "lookup_realm")]
50+
public RealmInfo LookupRealm { get; internal set; }
51+
52+
[DataMember(Name = "authentication_type")]
53+
public string AuthenticationType { get; internal set; }
2554
}
2655
}

0 commit comments

Comments
 (0)