diff options
Diffstat (limited to 'lib/private/Authentication/Token')
10 files changed, 1 insertions, 14 deletions
diff --git a/lib/private/Authentication/Token/DefaultToken.php b/lib/private/Authentication/Token/DefaultToken.php index 4af42d07813..7ca05849635 100644 --- a/lib/private/Authentication/Token/DefaultToken.php +++ b/lib/private/Authentication/Token/DefaultToken.php @@ -43,7 +43,6 @@ use OCP\AppFramework\Db\Entity; * @method void setVersion(int $version) */ class DefaultToken extends Entity implements INamedToken { - const VERSION = 1; /** @var string user UID */ diff --git a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php index 25b4aa59a92..0686f40e82f 100644 --- a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php +++ b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php @@ -27,11 +27,9 @@ use OC; use OC\BackgroundJob\Job; class DefaultTokenCleanupJob extends Job { - protected function run($argument) { /* @var $provider IProvider */ $provider = OC::$server->query(IProvider::class); $provider->invalidateOldTokens(); } - } diff --git a/lib/private/Authentication/Token/DefaultTokenMapper.php b/lib/private/Authentication/Token/DefaultTokenMapper.php index 3f11e02d5cd..e51033ed1df 100644 --- a/lib/private/Authentication/Token/DefaultTokenMapper.php +++ b/lib/private/Authentication/Token/DefaultTokenMapper.php @@ -36,7 +36,6 @@ use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; class DefaultTokenMapper extends QBMapper { - public function __construct(IDBConnection $db) { parent::__construct($db, 'authtoken'); } @@ -168,5 +167,4 @@ class DefaultTokenMapper extends QBMapper { ->andWhere($qb->expr()->eq('version', $qb->createNamedParameter(DefaultToken::VERSION, IQueryBuilder::PARAM_INT))); $qb->execute(); } - } diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php index 05e601d78a7..3556cfd24b0 100644 --- a/lib/private/Authentication/Token/DefaultTokenProvider.php +++ b/lib/private/Authentication/Token/DefaultTokenProvider.php @@ -286,7 +286,6 @@ class DefaultTokenProvider implements IProvider { $password = $this->getPassword($token, $oldTokenId); $token->setPassword($this->encryptPassword($password, $newTokenId)); } catch (PasswordlessTokenException $e) { - } $token->setToken($this->hashToken($newTokenId)); diff --git a/lib/private/Authentication/Token/IToken.php b/lib/private/Authentication/Token/IToken.php index e2de2b5fbbd..1f7c736f86b 100644 --- a/lib/private/Authentication/Token/IToken.php +++ b/lib/private/Authentication/Token/IToken.php @@ -30,7 +30,6 @@ namespace OC\Authentication\Token; use JsonSerializable; interface IToken extends JsonSerializable { - const TEMPORARY_TOKEN = 0; const PERMANENT_TOKEN = 1; const WIPE_TOKEN = 2; diff --git a/lib/private/Authentication/Token/IWipeableToken.php b/lib/private/Authentication/Token/IWipeableToken.php index 62293e6933b..efc542faa69 100644 --- a/lib/private/Authentication/Token/IWipeableToken.php +++ b/lib/private/Authentication/Token/IWipeableToken.php @@ -33,5 +33,4 @@ interface IWipeableToken extends IToken { * Mark the token for remote wipe */ public function wipe(): void; - } diff --git a/lib/private/Authentication/Token/Manager.php b/lib/private/Authentication/Token/Manager.php index dddc675a428..073569de0cf 100644 --- a/lib/private/Authentication/Token/Manager.php +++ b/lib/private/Authentication/Token/Manager.php @@ -139,7 +139,7 @@ class Manager implements IProvider { throw $e; } catch (ExpiredTokenException $e) { throw $e; - } catch(InvalidTokenException $e) { + } catch (InvalidTokenException $e) { // No worries we try to convert it to a PublicKey Token } @@ -272,6 +272,4 @@ class Manager implements IProvider { $this->defaultTokenProvider->updatePasswords($uid, $password); $this->publicKeyTokenProvider->updatePasswords($uid, $password); } - - } diff --git a/lib/private/Authentication/Token/PublicKeyToken.php b/lib/private/Authentication/Token/PublicKeyToken.php index 221f286ae05..27eda0b6889 100644 --- a/lib/private/Authentication/Token/PublicKeyToken.php +++ b/lib/private/Authentication/Token/PublicKeyToken.php @@ -47,7 +47,6 @@ use OCP\AppFramework\Db\Entity; * @method bool getPasswordInvalid() */ class PublicKeyToken extends Entity implements INamedToken, IWipeableToken { - const VERSION = 2; /** @var string user UID */ diff --git a/lib/private/Authentication/Token/PublicKeyTokenMapper.php b/lib/private/Authentication/Token/PublicKeyTokenMapper.php index 15a161aef64..e05325fec30 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenMapper.php +++ b/lib/private/Authentication/Token/PublicKeyTokenMapper.php @@ -33,7 +33,6 @@ use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; class PublicKeyTokenMapper extends QBMapper { - public function __construct(IDBConnection $db) { parent::__construct($db, 'authtoken'); } diff --git a/lib/private/Authentication/Token/RemoteWipe.php b/lib/private/Authentication/Token/RemoteWipe.php index b1fc757f744..cab68357a01 100644 --- a/lib/private/Authentication/Token/RemoteWipe.php +++ b/lib/private/Authentication/Token/RemoteWipe.php @@ -152,5 +152,4 @@ class RemoteWipe { return true; } - } |