This repository was archived by the owner on Jun 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
main/java/com/venafi/vcert/sdk/connectors/tpp
test/java/com/venafi/vcert/sdk/connectors/tpp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import lombok .Data ;
66
77@ Data
8- public class AuthorizeTokenResponse {
9-
10- @ SerializedName ("access_token" )
11- private String accessToken ;
12-
13- @ SerializedName ("refresh_token" )
14- private String refreshToken ;
15-
16- @ SerializedName ("expires" )
17- private long expire ;
18-
19- @ SerializedName ("token_type" )
20- private String tokenType ;
21-
22- @ SerializedName ("scope" )
23- private String scope ;
8+ public class AuthorizeTokenResponse extends TokenResponse {
249
2510 @ SerializedName ("identity" )
2611 private String identity ;
27-
28- @ SerializedName ("refresh_until" )
29- private long refreshUntil ;
30-
3112}
Original file line number Diff line number Diff line change 11package com .venafi .vcert .sdk .connectors .tpp ;
22
3- import com .google .gson .annotations .SerializedName ;
4-
5- import lombok .Data ;
6-
7- @ Data
8- public class RefreshTokenResponse {
9-
10- @ SerializedName ("access_token" )
11- private String accessToken ;
12-
13- @ SerializedName ("refresh_token" )
14- private String refreshToken ;
15-
16- @ SerializedName ("expires" )
17- private long expire ;
18-
19- @ SerializedName ("token_type" )
20- private String tokenType ;
21-
22- @ SerializedName ("scope" )
23- private String scope ;
24-
25- @ SerializedName ("refresh_until" )
26- private long refreshUntil ;
3+ public class RefreshTokenResponse extends TokenResponse {
274}
Original file line number Diff line number Diff line change 1+ package com .venafi .vcert .sdk .connectors .tpp ;
2+
3+ import com .google .gson .annotations .SerializedName ;
4+
5+ import lombok .Data ;
6+
7+ @ Data
8+ public class TokenResponse {
9+
10+ @ SerializedName ("access_token" )
11+ private String accessToken ;
12+
13+ @ SerializedName ("refresh_token" )
14+ private String refreshToken ;
15+
16+ @ SerializedName ("expires" )
17+ private long expire ;
18+
19+ @ SerializedName ("token_type" )
20+ private String tokenType ;
21+
22+ @ SerializedName ("scope" )
23+ private String scope ;
24+
25+ @ SerializedName ("refresh_until" )
26+ private long refreshUntil ;
27+ }
Original file line number Diff line number Diff line change @@ -65,10 +65,11 @@ public class TppTokenConnectorTest {
6565 @ BeforeEach
6666 void setUp () throws VCertException {
6767 this .classUnderTest = new TppTokenConnector (tpp );
68-
69- AuthorizeTokenResponse response =
70- new AuthorizeTokenResponse ().accessToken (ACCESS_TOKEN ).
71- refreshToken (REFRESH_TOKEN );
68+
69+ AuthorizeTokenResponse response = new AuthorizeTokenResponse ();
70+
71+ response .accessToken (ACCESS_TOKEN ).refreshToken (REFRESH_TOKEN );
72+
7273 when (tpp .authorizeToken (any (TppTokenConnector .AuthorizeTokenRequest .class ))).thenReturn (response );
7374
7475 Authentication authentication = Authentication .builder ().user ("user" ).password ("pass" ).build ();
You can’t perform that action at this time.
0 commit comments