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


##########
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:
   Yeah, you're right, I think it makes it easier from a caller perspective to 
understand the expected usage of those methods.



-- 
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