aboutsummaryrefslogtreecommitdiff
path: root/lib/ssosession.cpp
AgeCommit message (Collapse)Author
2022-01-06Brush up SsoSession; document Connection::prepareForSsoAlexey Rusakov
Although parented to Connection, SsoSession was pretty leaky in that unsuccessful login attempts didn't delete the object and in some errors didn't even close the local HTTP socket (though new connections would no more be accepted). Also, without the documentation it wasn't clear who owns the object returned by Connection::prepareForSso(). Now it is. Unfortunately, it's not easy to cover SsoSession with tests. Basically, it takes a homeserver and a mock "SSO agent" that would check the SSO URL for validity and then both send the login authorisation to the homeserver as well as ping the callback given by SsoSession. Maybe for another time.
2022-01-02Add ImplPtr and makeImplAlexey Rusakov
The original (more complex and comprehensive) solution belongs to https://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html - this commit only provides a small wrapper for non-copyable Private class implementations common throughout libQuotient. Unlike the original, default initialisation is made explicit - you have to pass ZeroImpl<Private>() instead (and I firmly believe it's a good thing: normally pointers to Private should not remain nullptr). The reason ZeroImpl<> is not a template variable is quite simple: unique_ptr is non-copyable and so cannot be initialised from; while a template function will initialise the value in-place thanks to copy elision.
2021-01-16Updated copyright statements upon Git auditKitsune Ral
After going through all the files and the history of commits on them it was clear that some copyright statements are obsolete (the code has been overwritten since) and some are missing. This commit tries best to remedy that, along with adding SPDX tags where they were still not used. Also, a minimal SPDX convention is documented for further contributions. Closes #426.
2020-11-26Enable QT_NO_URL_CAST_FROM_STRING and QT_STRICT_ITERATORS.David Faure
* QT_NO_URL_CAST_FROM_STRING makes it clearer where QUrls are created from QStrings (which incurs a parsing cost). * QT_STRICT_ITERATORS helps detecting where begin()/end() is used instead of cbegin()/cend(). KDE developers have verified that the generated assembly code is identical.
2020-06-07SsoSession: let Private be a class everywhereKitsune Ral
Fixes a compilation warning that Private is a struct in one place and a class in another.
2020-03-18SsoSession and Connection::prepareForSso()Kitsune Ral
The response in the web browser is quite barebone, just enough to give feedback that things are alright. Closes #386. Closes #388.