File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
main/java/com/dropbox/core/v2
test/java/com/dropbox/core Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 22---------------------------------------------
33- Add configureRequest(..) method for simpler subclassing of OkHttpRequestor and OkHttp3Requestor.
44- 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.
56
672.0.6 (2016-06-20)
78---------------------------------------------
Original file line number Diff line number Diff line change 1616 * <p> This class has no mutable state, so it's thread safe as long as you pass
1717 * in a thread safe {@link HttpRequestor} implementation. </p>
1818 */
19- public final class DbxClientV2 extends DbxClientV2Base {
19+ public class DbxClientV2 extends DbxClientV2Base {
2020
2121 /**
2222 * Creates a client that uses the given OAuth 2 access token as
Original file line number Diff line number Diff line change 2121 * <p> This class has no mutable state, so it's thread safe as long as you pass
2222 * in a thread safe {@link HttpRequestor} implementation. </p>
2323 */
24- public final class DbxTeamClientV2 extends DbxTeamClientV2Base {
24+ public class DbxTeamClientV2 extends DbxTeamClientV2Base {
2525 private final String accessToken ;
2626
2727 /**
Original file line number Diff line number Diff line change @@ -158,7 +158,6 @@ public void testFinishWithState() throws Exception {
158158 "\" token_type\" :\" Bearer\" " +
159159 ",\" access_token\" :\" " + expected .getAccessToken () + "\" " +
160160 ",\" uid\" :\" " + expected .getUserId () + "\" " +
161- ",\" state\" :\" " + expected .getUrlState () + "\" " +
162161 "}"
163162 ).getBytes ("UTF-8" )
164163 );
@@ -186,9 +185,9 @@ public void testFinishWithState() throws Exception {
186185 "state" , extractQueryParam (authorizationUrl , "state" ))
187186 );
188187
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
190189 String finishParams = new String (body .toByteArray (), "UTF-8" );
191- assertEquals ( extractQueryParam (finishParams , "state" ), state );
190+ assertNull ( toParamsMap (finishParams ). get ( "state" ));
192191
193192 assertNotNull (actual );
194193 assertEquals (actual .getAccessToken (), expected .getAccessToken ());
You can’t perform that action at this time.
0 commit comments