AnTu2702 commented on PR #6900:
URL: https://github.com/apache/nifi/pull/6900#issuecomment-1978198291

   > @AnTu2702 The `oauth2AccessTokenProviderOptional` field is used in the 
`buildUrl` method where we call 
`oauth2AccessTokenProvider.getAccessDetails().getAccessToken()`. The 
`getAccessDetail()` should take care of refreshing/reacquiring tokens (this is 
the same call you suggest doing at the beginning of `onTrigger`).
   > 
   > So according to this, token expiration is handled already. Do we have 
proof that this doesn't work for some reason?
   
   Hey. The `this.messageReceiver = this.buildMessageReceiver(context)` and 
thus `buildUrl` method in line 331 is only called once. Reason is line 329: `if 
(this.messageReceiver == null)`
   
   
![image](https://github.com/apache/nifi/assets/5054213/0321114d-e8bf-47cc-af12-df053c7ed1c5)
   


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