I am using OAuth service, which supports only form data for password grant type. So, additional tries are wasting resources. OAuth service is throttling multiple requests and sometimes even block IP. A user is able to get a block 3 times easier.
I understand why this behavior is implemented. However, would be cool to configure them. I could implement it by myself. But I am needed agreement on API.
I would suggest adding:
public OAuth2Client.Builder failback(Failback failback) { .... }
enum Failback {
FULL, BASIC_AUTH, AUTHORIZATION, NOTHING
}
Failback could be called RequestType as well.
Of course, the default behavior has to remain.