Skip to content

Conversation

@overheadhunter
Copy link
Contributor

This removes two public methods from the AuthorizationCodeGrant (which is still @ApiStatus.Experimental). Both are merely convenience methods and can easily be replaced:

public CompletableFuture<HttpResponse<String>> authorizeAsync(@BlockingExecutor Executor executor, Consumer<URI> browser, String... scopes) {
return authorizeAsync(HttpClient.newBuilder().executor(executor).build(), browser, scopes);
}

and

public HttpResponse<String> authorize(Consumer<URI> browser, String... scopes) throws IOException, InterruptedException {
return authorize(HttpClient.newHttpClient(), browser, scopes);
}

The new paradigm for the library consumer is to always pass an HttpClient instance.

@overheadhunter overheadhunter added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 26, 2023
@overheadhunter overheadhunter requested a review from infeo October 27, 2023 08:11
Copy link
Contributor

@infeo infeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In https://github.com/coffeelibs/tiny-oauth2-client/pull/8/files#diff-0c4a310c689eae40addbab8bb9b02a103bc0c91b38d768e51ac4d8f296624a20R128, we say that a single Thread executor is used. This is not true, the executor is the ForkJoinPool.commonPool(). Can you also fix that?

@overheadhunter overheadhunter merged commit 60166bf into develop Oct 27, 2023
@overheadhunter overheadhunter deleted the feature/consolidate-api branch October 27, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants