diff options
author | Christopher Hockley <christopher@putcocoa.in> | 2015-03-12 10:58:50 +0100 |
---|---|---|
committer | Christopher Hockley <christopher@putcocoa.in> | 2015-03-12 10:58:50 +0100 |
commit | d1adf46b85a65cda0e1ebaaa31bc9f26a513a7b6 (patch) | |
tree | f8e70ddcf2d7dd205cbfdf19a8d3449e6741f615 /src/core | |
parent | c9a78285bebc380e74b58a6e14f29a41c2d1596c (diff) |
Fixed OAuth2
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/provider/MCAccountValidator.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/provider/MCAccountValidator.cpp b/src/core/provider/MCAccountValidator.cpp index 8a290228..15c3a041 100644 --- a/src/core/provider/MCAccountValidator.cpp +++ b/src/core/provider/MCAccountValidator.cpp @@ -221,6 +221,10 @@ void AccountValidator::checkNextHost() mImapSession = new IMAPAsyncSession(); mImapSession->setUsername(mUsername); mImapSession->setPassword(mPassword); + if (mOAuth2Token != NULL) { + mImapSession->setOAuth2Token(mOAuth2Token); + mImapSession->setAuthType(AuthTypeXOAuth2); + } mImapServer = (NetService *) mImapServices->objectAtIndex(mCurrentServiceIndex); mImapSession->setHostname(mImapServer->hostname()); @@ -265,6 +269,10 @@ void AccountValidator::checkNextHost() mSmtpSession = new SMTPAsyncSession(); mSmtpSession->setUsername(mUsername); mSmtpSession->setPassword(mPassword); + if (mOAuth2Token != NULL) { + mSmtpSession->setOAuth2Token(mOAuth2Token); + mSmtpSession->setAuthType(AuthTypeXOAuth2); + } mSmtpServer = (NetService *) mSmtpServices->objectAtIndex(mCurrentServiceIndex); mSmtpSession->setHostname(mSmtpServer->hostname()); |