diff options
author | Joas Schilling <coding@schilljs.com> | 2017-01-26 13:10:35 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-03-29 11:59:16 +0300 |
commit | ebaa6d1a24088162d6b30e93fee9847cba1cfb97 (patch) | |
tree | d9ba0356039c2532480b2c71888987b2e98e8703 /lib/Controller/PushController.php | |
parent | 2fd4a9fbeb966a9d3ce1da8bb931292ecca6bd12 (diff) |
Get the token id from the session
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/PushController.php')
-rw-r--r-- | lib/Controller/PushController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Controller/PushController.php b/lib/Controller/PushController.php index d7be1a0..ce8cd73 100644 --- a/lib/Controller/PushController.php +++ b/lib/Controller/PushController.php @@ -101,9 +101,9 @@ class PushController extends OCSController { return new JSONResponse(['message' => 'Invalid device public key'], Http::STATUS_BAD_REQUEST); } - $sessionId = $this->session->getId(); + $tokenId = $this->session->get('token-id'); try { - $token = $this->tokenProvider->getToken($sessionId); + $token = $this->tokenProvider->getTokenById($tokenId); } catch (InvalidTokenException $e) { return new JSONResponse(['message' => 'Could not identify session token'], Http::STATUS_BAD_REQUEST); } |