MailTransport::OutlookOAuthTokenRequester Class
class MailTransport::OutlookOAuthTokenRequesterOAuth token requester for Outlook. More...
| Header: | #include <MailTransport/OutlookOAuthTokenRequester> |
| CMake: | find_package(KPim6MailTransport REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::MailTransport) |
| Inherits: | QObject |
Public Functions
| OutlookOAuthTokenRequester(const QString &clientId, const QString &tenantId, const QStringList &scopes, QObject *parent = nullptr) | |
| virtual | ~OutlookOAuthTokenRequester() override |
| void | refreshToken(const QString &refreshToken) |
| void | requestToken(const QString &usernameHint = {}) |
Signals
| void | finished(const MailTransport::TokenResult &result) |
Detailed Description
Member Function Documentation
[explicit] OutlookOAuthTokenRequester::OutlookOAuthTokenRequester(const QString &clientId, const QString &tenantId, const QStringList &scopes, QObject *parent = nullptr)
Creates a new OutlookOAuthTokenRequester with the specified credentials and parent object. clientId The OAuth client ID. tenantId The Azure tenant ID. scopes The OAuth scopes to request. parent The parent object.
[override virtual noexcept] OutlookOAuthTokenRequester::~OutlookOAuthTokenRequester()
Destroys the OutlookOAuthTokenRequester.
[signal] void OutlookOAuthTokenRequester::finished(const MailTransport::TokenResult &result)
Emitted when the token request or refresh is finished, with the result.
void OutlookOAuthTokenRequester::refreshToken(const QString &refreshToken)
Refreshes the existing OAuth token refreshToken.
void OutlookOAuthTokenRequester::requestToken(const QString &usernameHint = {})
Requests a new OAuth token with the optional username hint usernameHint.