You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/03/26 14:18:00 UTC
[jira] [Resolved] (CAMEL-14795) camel-mail: allow dynamic setting
of token in order to be able to support OAUTH
[ https://issues.apache.org/jira/browse/CAMEL-14795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-14795.
---------------------------------
Resolution: Fixed
Thanks for the PR
> camel-mail: allow dynamic setting of token in order to be able to support OAUTH
> -------------------------------------------------------------------------------
>
> Key: CAMEL-14795
> URL: https://issues.apache.org/jira/browse/CAMEL-14795
> Project: Camel
> Issue Type: Improvement
> Components: camel-mail
> Affects Versions: 3.2.0
> Reporter: Franz Forsthofer
> Priority: Major
> Fix For: 3.2.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> camel-mail uses java-mail. Meanwhile java-mail does support OAuth for imap and smtp (see [https://javaee.github.io/javamail/OAuth2]). The OAuth access tokens typically expire. The current camel-mail component does not allow to dynamically read the password (=token), the password is fix set in the configuration. Therefore it is not possible to update the password/token.
> We improve the camel-mail component so that it is possible to dynamically read the user and password/token, so that the OAuth use case can be supported.
> Instead of setting the user and password on the configuration, you specify an authenticator bean in the configuration. The authenticator method
> public PasswordAuthentication getPasswordAuthentication()
> will be called dynamically whenever a user/token (or password) is needed for connecting to the mail server.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)