aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Authentication
Commit message (Collapse)AuthorAgeFilesLines
* composer run cs:fixCôme Chilliet2023-01-2017-17/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat: add event for failed loginsRoeland Jago Douma2022-11-241-0/+62
| | | | | | | | Apps might also like to know about failed logins. This adds that event. The private interface changes are backwards compatible so all should be fine. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix wrong types in phpdoc for twofactor registryCarl Schwan2022-10-121-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Allow SSO authentication to provide a user secretMichaIng2022-07-121-0/+41
| | | | | | Implementing PR #24837 from immerda Signed-off-by: MichaIng <micha@dietpi.com>
* Specify string as nullable for credentials passwordAnna Larch2022-02-281-1/+1
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0423-51/+23
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add real events for enabled 2fa providers for usersRoeland Jago Douma2021-03-222-0/+130
| | | | | | | * Shiny new events * Listener to still emit the old event Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Deprecate all remaining event constantsChristoph Wurst2021-02-092-0/+12
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22432 from nextcloud/enh/phpdocRoeland Jago Douma2020-08-261-1/+0
|\ | | | | Add php docs build script
| * Remove @package annotations from public namespaceJulius Härtl2020-08-261-1/+0
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Update the license headers for Nextcloud 20Christoph Wurst2020-08-243-3/+7
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #21344 from nextcloud/fix/twofactor-cleanup-eventMorris Jobke2020-08-131-0/+52
|\ | | | | Emit an event for every disabled 2FA provider during cleanup
| * Emit an event for every disabled 2FA provider during cleanupChristoph Wurst2020-06-161-0/+52
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Add PHP doc for eventsMorris Jobke2020-08-101-3/+1
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Allow to register AlternativeLogin on RegistrationContextJoas Schilling2020-07-161-0/+58
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headers for 19Christoph Wurst2020-04-291-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-102-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-1014-16/+0
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove trailing whitespaces from commentsChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use a blank line after the opening tagChristoph Wurst2020-04-091-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* [POC] Event for failed login attemptsRoeland Jago Douma2020-03-311-0/+58
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersChristoph Wurst2019-12-0518-32/+57
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add return type hint to credential store and make it strictChristoph Wurst2019-11-251-4/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-0/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add event dispatcher to OCPChristoph Wurst2019-06-251-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Allow 2FA to be setup on first loginRoeland Jago Douma2019-05-173-0/+118
| | | | | | | | | Once 2FA is enforced for a user and they have no 2FA setup yet this will now prompt them with a setup screen. Given that providers are enabled that allow setup then. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix activatable/deactivatable 2fa provider interface typosChristoph Wurst2018-12-032-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Consolidate personal two-factor provider settingsChristoph Wurst2018-10-022-0/+90
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Let 2FA providers provide their custom icons (dark/light)Christoph Wurst2018-10-011-0/+55
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Emit event on enablign or disabling of 2FA providerRoeland Jago Douma2018-10-012-0/+66
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Only allow 2FA state changs if providers support the operationChristoph Wurst2018-09-251-0/+15
| | | | | | | | Ref https://github.com/nextcloud/server/issues/11019. Add `twofactorauth:cleanup` command Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add public interfaces for activable/deactivable 2FA providersChristoph Wurst2018-09-102-0/+102
| | | | | | | Fixes https://github.com/nextcloud/server/issues/11018. Required for https://github.com/nextcloud/server/issues/11019. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make 2FA providers statefulChristoph Wurst2018-06-201-0/+65
| | | | | | | | | | | This adds persistence to the Nextcloud server 2FA logic so that the server knows which 2FA providers are enabled for a specific user at any time, even when the provider is not available. The `IStatefulProvider` interface was added as tagging interface for providers that are compatible with this new API. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Strict 2FARoeland Jago Douma2018-03-263-8/+12
| | | | | | | | * make OCP\Authentication\TwoFactorAuth strict * scalar types * return types Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Dispatch event on twofactor failure and successRoeland Jago Douma2018-01-251-0/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersMorris Jobke2017-11-067-12/+12
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #6177 from nextcloud/properly-add-slo-urlMorris Jobke2017-08-261-7/+6
|\ | | | | Properly allow \OCP\Authentication\IApacheBackend to specify logout URL
| * Properly allow \OCP\Authentication\IApacheBackend to specify logout URLLukas Reschke2017-08-181-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any `\OCP\Authentication\IApacheBackend` previously had to implement `getLogoutAttribute` which returns a string. This string is directly injected into the logout `<a>` tag, so returning something like `href="foo"` would result in `<a href="foo">`. This is rather error prone and also in Nextcloud 12 broken as the logout entry has been moved with 054e161eb5f4a5c5c13ee322ae8e93ce66f01b13 inside the navigation manager where one cannot simply inject attributes. Thus this feature is broken in Nextcloud 12 which effectively leads to the bug described at nextcloud/user_saml#112, people cannot logout anymore when using SAML using SLO. Basically in case of SAML you have a SLO url which redirects you to the IdP and properly logs you out there as well. Instead of monkey patching the Navigation manager I decided to instead change `\OCP\Authentication\IApacheBackend` to use `\OCP\Authentication\IApacheBackend::getLogoutUrl` instead where it can return a string with the appropriate logout URL. Since this functionality is only prominently used in the SAML plugin. Any custom app would need a small change but I'm not aware of any and there's simply no way to fix this properly otherwise. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* | Allow 2FA providers to specify their custom CSPChristoph Wurst2017-08-261-0/+38
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Thows exception if password not availableMorris Jobke2017-05-122-0/+37
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* fix @since annotations (9.1->12)Christoph Wurst2017-01-113-7/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add @since annotations and document methodsChristoph Wurst2017-01-112-0/+14
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add login credential storeChristoph Wurst2017-01-113-0/+122
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix coding style and increase code coverageChristoph Wurst2017-01-111-12/+13
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update TwoFactorException.phpCornelius Kölbel2017-01-111-2/+2
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add a TwoFactorExceptionCornelius Kölbel2017-01-111-0/+37
| | | | | | | | | | | A Two Factor third party App may throw a TwoFactorException() with a more detailed error message in case the authentication fails. The 2FA Controller will then display the message of this Exception to the user. Working on #26593 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fix othersJoas Schilling2016-07-212-2/+4
|
* Update license headersLukas Reschke2016-05-261-1/+0
|
* Add two factor auth to coreChristoph Wurst2016-05-231-0/+93
|