summaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication
Commit message (Collapse)AuthorAgeFilesLines
* Clean pending 2FA authentication on password resetRoeland Jago Douma2019-01-301-0/+9
| | | | | | | | | | | When a password is reste we should make sure that all users are properly logged in. Pending states should be cleared. For example a session where the 2FA code is not entered yet should be cleared. The token is now removed so the session will be killed the next time this is checked (within 5 minutes). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move ExpiredTokenException to the correct namespaceRoeland Jago Douma2018-11-023-2/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make the token expiration also work for autocasting 0Roeland Jago Douma2018-06-081-1/+1
| | | | | | | Some bad databases don't respect the default null apprently. Now even if they cast it to 0 it should work just fine. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Certain tokens can expireRoeland Jago Douma2018-05-226-5/+85
| | | | | | | | However due to the nature of what we store in the token (encrypted passwords etc). We can't just delete the tokens because that would make the oauth refresh useless. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Allow the rotation of tokensRoeland Jago Douma2018-05-224-2/+54
| | | | | | This for example will allow rotating the apptoken for oauth Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Loss of performance on Login after upgrade from NC10 + LDAP to NC 12 + LDAP ↵Flávio Gomes da Silva Lisboa2017-11-271-0/+1
| | | | | | #6732 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Update license headersMorris Jobke2017-11-068-5/+20
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix duplicate session token after remembered loginChristoph Wurst2017-09-201-0/+1
| | | | | | | | | On a remembered login session, we create a new session token in the database with the values of the old one. As we actually don't need the old session token anymore, we can delete it right away. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix AppPassword 2FA authRoeland Jago Douma2017-09-121-1/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix login with basic authRoeland Jago Douma2017-09-051-1/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Improve 2FARoeland Jago Douma2017-08-291-3/+67
| | | | | | | | * Store the auth state in the session so we don't have to query it every time. * Added some tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix auth providerJoas Schilling2017-08-021-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix clob comparisonJoas Schilling2017-08-021-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* More phpstorm inspection fixesRoeland Jago Douma2017-07-241-2/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Minor typosMarcel Waldvogel2017-07-213-3/+3
| | | | Signed-off-by: Marcel Waldvogel <marcel.waldvogel@uni-konstanz.de>
* Merge pull request #4894 from nextcloud/generic-security-activitiesLukas Reschke2017-05-191-5/+6
|\ | | | | Change 2FA activities to more generic security activities
| * Change 2FA activities to more generic security activitiesChristoph Wurst2017-05-181-5/+6
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Rename table back to lowercaseLukas Reschke2017-05-181-8/+8
| | | | | | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* | delete auth token when client gets deletedBjoern Schiessle2017-05-181-7/+19
|/ | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Defining App "cron" for "Invalidating tokens older than" message #27167 (#27201)Martin2017-03-191-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* do not hard-require the token providerChristoph Wurst2017-01-111-6/+10
| | | | | | | | The provider might need DB access and therefore depenedency resolution fails on the setup page where we cannot inject the db implementation. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* use login hook credentials as fallbackChristoph Wurst2017-01-111-0/+21
| | | | | | | If no session token is available, we can use the credentials provided by the login hook. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix @since annotations (9.1->12)Christoph Wurst2017-01-111-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* replace session implementation if it changes at runtimeChristoph Wurst2017-01-111-0/+9
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add login credential storeChristoph Wurst2017-01-112-0/+158
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix minor issuesChristoph Wurst2016-12-191-5/+18
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Publish, parse and filter 2FA activitiesChristoph Wurst2016-12-191-1/+31
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #2353 from nextcloud/renew-session-token-rememberLukas Reschke2016-11-281-0/+1
|\ | | | | copy remember-me value when renewing a session token
| * copy remember-me value when renewing a session tokenChristoph Wurst2016-11-271-0/+1
| | | | | | | | | | | | | | | | | | On renew, a session token is duplicated. For some reason we did not copy over the remember-me attribute value. Hence, the new token was deleted too early in the background job and remember-me did not work properly. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | fix undefined index error when the backup codes provider is not activeChristoph Wurst2016-11-281-0/+3
|/ | | | | | | | In users have not created backup codes yet the app is not enabled for that user and therefore we got an undefined index error because the code assumed it was always there. It now properly returns null. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* use lower loglevel for token cleanup messagesRobin Appelman2016-11-171-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add test for setting up fake fsRobin Appelman2016-11-161-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Adds TokenProvider and Mapper testsRoeland Jago Douma2016-11-161-7/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* explicit typesRobin Appelman2016-11-161-5/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* cast to intRobin Appelman2016-11-161-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* phpdocRobin Appelman2016-11-161-2/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix setscopeRobin Appelman2016-11-161-2/+2
| | | | Signed-off-by: Robin Appelman <icewind@owncloud.com>
* allow configuring filesystem accessRobin Appelman2016-11-165-7/+71
| | | | Signed-off-by: Robin Appelman <icewind@owncloud.com>
* app password scope wipRobin Appelman2016-11-163-2/+19
| | | | Signed-off-by: Robin Appelman <icewind@owncloud.com>
* read lockdown scope from tokenRobin Appelman2016-11-163-2/+19
| | | | Signed-off-by: Robin Appelman <icewind@owncloud.com>
* document what the method doesChristoph Wurst2016-11-021-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add missing tests and fix PHPDocLukas Reschke2016-11-022-1/+9
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fix typ in constant nameLukas Reschke2016-11-021-4/+4
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fix invalid PHPDocsLukas Reschke2016-11-021-1/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* bring back remember-meChristoph Wurst2016-11-026-17/+70
| | | | | | | | | | * try to reuse the old session token for remember me login * decrypt/encrypt token password and set the session id accordingly * create remember-me cookies only if checkbox is checked and 2fa solved * adjust db token cleanup to store remembered tokens longer * adjust unit tests Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add 2fa backup codes appChristoph Wurst2016-09-051-2/+18
| | | | | * add backup codes app unit tests * add integration tests for the backup codes app
* prevent infinite redirect loops if the there is no 2fa provider to passChristoph Wurst2016-08-241-2/+16
| | | | | | | This fixes infinite loops that are caused whenever a user is about to solve a 2FA challenge, but the provider app is disabled at the same time. Since the session value usually indicates that the challenge needs to be solved before we grant access we have to remove that value instead in this special case.
* add invalidateOldTokens to IProvider interfaceChristoph Wurst2016-08-022-3/+7
|
* Check if an app provide two-factor-auth providers before we try to use themRobin Appelman2016-07-231-9/+11
|
* Fix othersJoas Schilling2016-07-2113-15/+26
|