File tree 2 files changed +12
-0
lines changed
src/Nest/XPack/Security/User/GetUserAccessToken
tests/Tests/XPack/Security/User/GetUserAccessToken
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -19,5 +19,8 @@ public class GetUserAccessTokenResponse : ResponseBase
19
19
20
20
[ DataMember ( Name = "type" ) ]
21
21
public string Type { get ; set ; }
22
+
23
+ [ DataMember ( Name = "authentication" ) ]
24
+ public AuthenticateResponse Authentication { get ; set ; }
22
25
}
23
26
}
Original file line number Diff line number Diff line change 7
7
using Elasticsearch . Net ;
8
8
using FluentAssertions ;
9
9
using Nest ;
10
+ using Tests . Configuration ;
11
+ using Tests . Core . Extensions ;
10
12
using Tests . Framework . EndpointTests ;
11
13
using Tests . Framework . EndpointTests . TestState ;
12
14
using static Elastic . Elasticsearch . Ephemeral . ClusterAuthentication ;
@@ -63,6 +65,13 @@ protected override void ExpectResponse(GetUserAccessTokenResponse response)
63
65
response . Type . Should ( ) . NotBeNullOrEmpty ( ) . And . Be ( "Bearer" ) ;
64
66
response . ExpiresIn . Should ( ) . BeGreaterThan ( 0 ) ;
65
67
response . Scope . Should ( ) . Be ( "full" ) ;
68
+
69
+ if ( TestConfiguration . Instance . InRange ( ">=7.11.0" ) )
70
+ {
71
+ response . Authentication . Should ( ) . NotBeNull ( ) ;
72
+ response . Authentication . Username . Should ( ) . NotBeNullOrEmpty ( ) ;
73
+ response . Authentication . Roles . Count . Should ( ) . BeGreaterThan ( 0 ) ;
74
+ }
66
75
}
67
76
}
68
77
You can’t perform that action at this time.
0 commit comments