- 12 Oct, 2018 26 commits
-
-
Laurent Montel authored
-
Krzysztof Nowicki authored
Before Qt 5.10 QtNetworkAuth was in Tech Preview state and was missing methods to set and retrieve refresh tokens.
-
Krzysztof Nowicki authored
This test only includes a very basic test case for now. More to come.
-
Krzysztof Nowicki authored
Prepare an advanced version of the unittest addition macro used for test cases which require some non-standard set-up, like extra sources or link libraries.
-
Krzysztof Nowicki authored
Instead of just popping the web browser authentication window display a notification informing the user about the token expiration and let him trigger the authentication by clicking the action button.
-
Krzysztof Nowicki authored
-
Krzysztof Nowicki authored
The implementation inside QOauthOobReplyHandler has one major problem - in case something goes south it only prints an error to the log and exits leaving the authentication process hanging and waiting for something that will never come. Instead use an additional signal to notify the OAuth2 authentication controller that a problem occurred so that the state can be safely reset.
-
Krzysztof Nowicki authored
In case this fails fall back to full authentication.
-
Krzysztof Nowicki authored
This involves traffic from all three possible sources: * Settings dialog * Storage (wallet) * EWS client
-
Krzysztof Nowicki authored
-
Krzysztof Nowicki authored
-
Krzysztof Nowicki authored
This avoids reauthentication when the existing tokens are valid. In case there are no tokens or they're invalid the tokens retrieved from the OAuth2 authentication process are taken back and stored.
-
Krzysztof Nowicki authored
This will allow use of already stored tokens in the configuration dialog.
-
Krzysztof Nowicki authored
This most likely means that the OAuth2 access token is no longer valid. Try to reset and refresh it.
-
Krzysztof Nowicki authored
Unline password authentication the OAuth2 authentication can at any time change the tokens due to reauthentication or access token refresh. These updated tokens need to be passed up to the main resource in order for them to be stored for use after a restart. The access token also needs to be reset in case it is found not to be valid any more.
-
Krzysztof Nowicki authored
-
Krzysztof Nowicki authored
This merges the codepaths used to read and write the password into a single wallet request that can be used for both. Existing functionality, which satisfies a pending read password request with a write password request is retained. This prepares the code for introduction of storing the OAuth2 tokens in the wallet.
-
Krzysztof Nowicki authored
-
Krzysztof Nowicki authored
This is needed whenever the browser window would need to be displayed on top of an existing dialog window, which is the case when the configuration dialog is open. Otherwise the modality order is wrong and the browser window is unable to accept user input.
-
Krzysztof Nowicki authored
When a request is started in case of enabled OAuth2 the implementation checks if a token is available and if not - launches the authentication. The actual HTTP request is delayed until that process is completed. This process is also started in case a 401 Unauthorized HTTP response is received with OAuth2 enabled.
-
Krzysztof Nowicki authored
-
Krzysztof Nowicki authored
The event loop executed by KJob::exec() explicitly blocks input events. This will cause the Cancel button to be effectively block and will also prevent interaction with the OAuth2-driven web browser.
-
Krzysztof Nowicki authored
This includes a class which will be responsible for driving the OAuth2 authentication using QtNetworkAuth framework. QWebEngine is used as the browser for the interactive steps. The class will be later used by the EWS request to retrieve the bearer token.
-
Krzysztof Nowicki authored
This description explains the role of this checkbox and the difference between "no domain" vs. "empty domain".
-
Krzysztof Nowicki authored
The field is disabled for now until support in code is added.
-
Krzysztof Nowicki authored
Split out the authentication and EWS-specific fields into dedicated groups. This is a preparatory change for introducing OAuth2 as an alternative authentication option.
-
- 10 Oct, 2018 1 commit
-
-
Script Kiddy authored
In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
-
- 09 Oct, 2018 6 commits
-
-
Krzysztof Nowicki authored
Using invoke method makes no sense as the QThread object always lives in the parent (=main) thread, which means the message will get dispatched to the current thread's event loop anyway. Since that event loop will be blocked by the subsequent wait() call the message will never reach the fake server thread. Instead just call the method directly.
-
Krzysztof Nowicki authored
This ensures that the next test always sees a clean state of the resource.
-
Krzysztof Nowicki authored
Whenever an option is set on a resource during the POP3 test wait for the resource to acknowledge. This makes sure the resource has actually consumed this setting before relying on it in subsequent tests.
-
Krzysztof Nowicki authored
The maildir resource should automatically create all the paths inside its data dir. Unfortunately in case of the POP3 test this does not happen for some reason. Work around by creating the paths manually.
-
Krzysztof Nowicki authored
The POP3 resource test simulates a series of POP3 messages to the resource and waits for them to be processed. Unfortunately this is not enough as even though the POP3 resource is done talking to the server processing of items in Akonadi and in the associated maildir resource can still take some time. Due to this fact the POP3 tests were failing intermittently. In order to prevent that run an additional wait loop with the help of the monitor interface. Each time an item operation is notified a timer is reset. Once no item operation happens within 200ms it is safe to assume that the server is done and all the operations resulting from the simulated POP3 traffic have been committed.
-
Krzysztof Nowicki authored
This is to prevent attempts to delete them again. Fixes the testCountBasedLeaveRule, which excercises the following scenario: * initial state: 3 messages known * two new messages are added on server * LIST returns 5 messages * UIDL returns 5 UIDs, 2 of them new * download of 2 messages starts * fetch of first message is completed * item create for first message is completed * item create completion triggers cleanup of unwanted server messages * messages 1 and 3 are deleted as they are the oldest * fetch of second message is completed * item create for second message is completed * item create completion triggers cleanup of unwanted server messages * messages 1 and 3 are deleted again - this causes the test to fail Removing those identifiers causes the second search for items to delete to return an empty set and no further delete attempts are made. Reviewers: #kde_pim Reviewed By: dvratil Tags: #kde_pim Differential Revision: https://phabricator.kde.org/D15975
-
- 05 Oct, 2018 3 commits
-
-
Krzysztof Nowicki authored
When determining ids of mails to delete a special identifier -1 is used to reference all e-mails. When the "leave on server" flag is not set asking for deletion of all mails should really return a list of all mail ids. This fixes Pop3Test::testSimpleLeaveOnServer test case. Reviewers: #kde_pim Reviewed By: dvratil Tags: #kde_pim Differential Revision: https://phabricator.kde.org/D15962
-
Krzysztof Nowicki authored
Setting the maildir path is an asynchronous operation of which effects can be delayed. Fetching the maildir root collection before that will cause the fetched identifier to become stale and cause a cascade of failures. This makes use of the internal information that the remote identifier of the maildir resource is the path to the storage directory.
-
Laurent Montel authored
GIT_SILENT: Cleanup: remove ECMOptionalAddSubdirectory which is never used\n ECMMarkNonGuiExecutable which is includes in ECMAddTests module\n CMakePackageConfigHelpers which is included by ECMSetupVersion
-
- 04 Oct, 2018 4 commits
-
-
Krzysztof Nowicki authored
-
Krzysztof Nowicki authored
The test works by faking responses to some EWS requests and waiting for the resource to reach an expected state based on mocked responses to these requests. The state expectation logic is driven by Akonadi collection change monitor. Unfortunately every now and then some notifications get lost causing the state not to be reached while the server is actually in a correct one. Work around this by introducing an optional recheck method that fetches all collections and forces a recheck of the current state. This should finally fix the isolated tests for good.
-
Krzysztof Nowicki authored
It looks like use of EntityDisplayAttribute was deprecated. This fixes the isolated test not being able to reach expected state. Note: the test still fails intermittently - to be investigated.
-
Krzysztof Nowicki authored
Commit a20701f5 added the "has domain" flag to fix ambiguity between empty domain and no domain in the username. Unfortunately the default behaviour was set to "domain present", which changed the default username from "test" to "/test" causing an unexpected value of the Authorization HTTP header and in turn a failure. Fix this by explicitly setting the "has domain" flag to false.
-