pvillard31 commented on code in PR #9822:
URL: https://github.com/apache/nifi/pull/9822#discussion_r2016199934


##########
nifi-extension-bundles/nifi-standard-services/nifi-oauth2-provider-api/src/main/java/org/apache/nifi/oauth2/OAuth2AccessTokenProvider.java:
##########
@@ -27,4 +27,14 @@ public interface OAuth2AccessTokenProvider extends 
ControllerService {
      * @return A valid access token (refreshed automatically if needed) and 
additional metadata (provided by the OAuth2 access server)
      */
     AccessToken getAccessDetails();
+
+    /**
+     * @param forceAccessTokenRefresh true if the access token should be 
refreshed
+     *                                even if it is not expired
+     * @return A valid access token (refreshed automatically if needed) and
+     *         additional metadata (provided by the OAuth2 access server)
+     */
+    default AccessToken getAccessDetails(final boolean 
forceAccessTokenRefresh) {

Review Comment:
   Thinking a bit more about it... `refreshAccessDetails()`, as of now, assumes 
that the refresh token is not null. Some services do not send a refresh token 
with the access token. So I'll have to adjust the logic just a bit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to