File tree 4 files changed +5
-5
lines changed
main/java/com/dropbox/core/v2
test/java/com/dropbox/core
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 2
2
---------------------------------------------
3
3
- Add configureRequest(..) method for simpler subclassing of OkHttpRequestor and OkHttp3Requestor.
4
4
- Fix BadRequest error when adding custom state to a DbxWebAuth.Request object.
5
+ - Remove final modifier from DbxClientV2 and DbxTeamClientV2 class declarations for easier mocking in tests.
5
6
6
7
2.0.6 (2016-06-20)
7
8
---------------------------------------------
Original file line number Diff line number Diff line change 16
16
* <p> This class has no mutable state, so it's thread safe as long as you pass
17
17
* in a thread safe {@link HttpRequestor} implementation. </p>
18
18
*/
19
- public final class DbxClientV2 extends DbxClientV2Base {
19
+ public class DbxClientV2 extends DbxClientV2Base {
20
20
21
21
/**
22
22
* Creates a client that uses the given OAuth 2 access token as
Original file line number Diff line number Diff line change 21
21
* <p> This class has no mutable state, so it's thread safe as long as you pass
22
22
* in a thread safe {@link HttpRequestor} implementation. </p>
23
23
*/
24
- public final class DbxTeamClientV2 extends DbxTeamClientV2Base {
24
+ public class DbxTeamClientV2 extends DbxTeamClientV2Base {
25
25
private final String accessToken ;
26
26
27
27
/**
Original file line number Diff line number Diff line change @@ -158,7 +158,6 @@ public void testFinishWithState() throws Exception {
158
158
"\" token_type\" :\" Bearer\" " +
159
159
",\" access_token\" :\" " + expected .getAccessToken () + "\" " +
160
160
",\" uid\" :\" " + expected .getUserId () + "\" " +
161
- ",\" state\" :\" " + expected .getUrlState () + "\" " +
162
161
"}"
163
162
).getBytes ("UTF-8" )
164
163
);
@@ -186,9 +185,9 @@ public void testFinishWithState() throws Exception {
186
185
"state" , extractQueryParam (authorizationUrl , "state" ))
187
186
);
188
187
189
- // verify the CRSF nonce was properly stripped from the finish request
188
+ // verify the state param isn't send to the 'oauth2/token' endpoint
190
189
String finishParams = new String (body .toByteArray (), "UTF-8" );
191
- assertEquals ( extractQueryParam (finishParams , "state" ), state );
190
+ assertNull ( toParamsMap (finishParams ). get ( "state" ));
192
191
193
192
assertNotNull (actual );
194
193
assertEquals (actual .getAccessToken (), expected .getAccessToken ());
You can’t perform that action at this time.
0 commit comments