Skip to content

Commit c409404

Browse files
committed
Add overload for finishFromCode with redirectUri.
1 parent 7204cd3 commit c409404

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main/java/com/dropbox/core/DbxWebAuth.java

+14
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,20 @@ public DbxAuthFinish finishFromCode(String code) throws DbxException {
295295
return finish(code);
296296
}
297297

298+
/**
299+
* Call this after the user has visited the authorizaton URL with a redirectUrl and copy/pasted
300+
* the authorization code that Dropbox gave them.
301+
*
302+
* @param code The authorization code shown to the user when they clicked "Allow" on the
303+
* authorization, page on the Dropbox website, never {@code null}.
304+
* @param redirectUri The original redirect URI used by {@link #authorize}, never {@code null}.
305+
*
306+
* @throws DbxException if an error occurs communicating with Dropbox.
307+
*/
308+
public DbxAuthFinish finishFromCode(String code, String redirectUri) throws DbxException {
309+
return finish(code, redirectUri, null);
310+
}
311+
298312
/**
299313
* Call this after the user has visited the authorizaton URL and Dropbox has redirected them
300314
* back to you at the redirect URI.

0 commit comments

Comments
 (0)