Roman created NIFI-12859:
----------------------------
Summary: OAUTH Refresh not working in ConsumeIMAP
Key: NIFI-12859
URL: https://issues.apache.org/jira/browse/NIFI-12859
Project: Apache NiFi
Issue Type: Bug
Affects Versions: 1.25.0, 1.24.0
Reporter: Roman
The ConsumeIMAP Processor implements the AbstractEmailProcessor.
With Issue NIFI-11107 there was introduced OAUTH2 Support. Initial OAUTH is
working fine.
But the refresh token implementation is not working with Credential Flow in
OAUTH Processor.
Reason:
Method to refresh token => oauth2AccessTokenProvider.getAccessDetails(); is
called only in onScheduled Method of AbstractEmailProcessor.
But once the consumeIMAPProcessor is startet (also for cron based scheduling)
only the onTriggeredMethod will be triggered.
OnScheduled will be only triggered on start 1time.
OnTriggered will be also triggered after start of the consumeImapProcessor.
So I would suggest to move the parts of code for oauth2AccessTokenProvider from
onScheduledMethod to onTriggeredMethod
--
This message was sent by Atlassian Jira
(v8.20.10#820010)