nextcloud/lib/private/Authentication/Token
Christoph Wurst 0299ea0a96
Handle token insert conflicts
Env-based SAML uses the "Apache auth" mechanism to log users in. In this
code path, we first delete all existin auth tokens from the database,
before a new one is inserted. This is problematic for concurrent
requests as they might reach the same code at the same time, hence both
trying to insert a new row wit the same token (the session ID). This
also bubbles up and disables user_saml.

As the token might still be OK (both request will insert the same data),
we can actually just check if the UIDs of the conflict row is the same
as the one we want to insert right now. In that case let's just use the
existing entry and carry on.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-11-26 12:07:12 +01:00
..
DefaultToken.php Add interface INamedToken 2019-02-02 20:21:57 +01:00
DefaultTokenCleanupJob.php Use ::class statement instead of string 2018-01-29 12:03:47 +01:00
DefaultTokenMapper.php Use constant for token version 2018-06-18 22:11:55 +02:00
DefaultTokenProvider.php Make renewSessionToken return the new token 2019-10-09 10:10:37 +02:00
INamedToken.php Some php-cs fixes 2019-11-22 20:52:10 +01:00
IProvider.php Make renewSessionToken return the new token 2019-10-09 10:10:37 +02:00
IToken.php Remote wipe support 2019-05-20 20:50:27 +02:00
IWipeableToken.php Refactor: move remote wipe token logic to RW service 2019-07-09 13:39:27 +02:00
Manager.php Handle token insert conflicts 2019-11-26 12:07:12 +01:00
PublicKeyToken.php Remote wipe support 2019-05-20 20:50:27 +02:00
PublicKeyTokenMapper.php Add uid to delete temp token query 2019-09-18 16:52:42 +02:00
PublicKeyTokenProvider.php Make renewSessionToken return the new token 2019-10-09 10:10:37 +02:00
RemoteWipe.php Make it possible to wipe all tokens/devices of a user 2019-07-09 13:57:04 +02:00