opened
intzerodev
username_0
-> Yes, shouldRefreshToken()?
&ensp;&ensp;&ensp; -> Yes - authorizeWithRefreshToken()
&ensp;&ensp;&ensp; -> No - authorizeWithClientCredentials()
-> No - End
- shouldRefreshToken()
: Just checks the grant types and whether the refresh token exists. Because the refresh token would not be used in client credentials grant type, I added the grant type check code here.
Due to the changes of refreshIfNecessary() method, the shouldRefreshToken() no longer needs to call the hasTokenExpired().
This change removes redundant call of 'hasTokenExpired()' when the refresh token is used.

(3) Removed **isClientCredentialsGrantType()**
- isClientCredentialsGrantType()
: This method was used to check the type to avoid using the refresh token in client credentials grant type. Because the grant type will be checked in the updated shouldRefreshToken() method, I removed this one.

2. ServerOAuth2AuthorizedClientExchangeFilterFunctionTests class
- filterWhenClientCredentialsTokenExpiredThenGetNewToken()
: I have also modified the test class according to above changes.
Eliminates redundant method calls
issue
created
nealeu
username_1
That's quite some area to be getting into as your first ever activity on Github.  Are you working for the NSA? ;-)
comment
created
nealeu
username_1
One thing I've spotted is that I so far see no contract that says that a side-effect of any authorizedClientResolver.clientCredentials() implementation is that authorizedClientRepository.saveAuthorizedClient() has been called.

Perhaps @rwinch has an idea as to how that may not always the case?
comment