Commit graph

20 commits

Author SHA1 Message Date
Antoine Clausse
fc34b41b5b [web] Promisify two-factor-authentication (#19004)
* Fixup typos

* Promisify `getPendingUser`

* Promisify `getPendingUserWithExpectations`

* Add promises to `AccessTokenEncryptor`

* Promisify `TwoFactorAuthenticationHandler`

* Promisify/Expressify `TwoFactorAuthenticationController`

* Centralise `unprocessableEntity` error handling into a function

* Fixup: entralise `unprocessableEntity` error handling into a function

Avoid "responding to the query twice"

* Remove unnecessary try/catch

* Fixup: Add `async` to AccessTokenEncryptor promises

* Add tests on `AccessTokenEncryptor.promises`

* Revert "Fixup: entralise `unprocessableEntity` error handling into a function"

This reverts commit 23bd9d73260733062908b98961846733c61171e9.

* Revert "Centralise `unprocessableEntity` error handling into a function"

This reverts commit 197ca3da02412d5224d411b29df1d7b9e5327d01.

GitOrigin-RevId: 1a2864d28e87fd5e48cd3723a3da8047b79a1596
2024-06-26 08:05:06 +00:00
Andrew Rumble
71187a51ba Merge pull request #18289 from overleaf/ac-ar-eslint-return-await
Add ESLint rule @typescript-eslint/return-await to backend services

GitOrigin-RevId: 75e3e32597827fcc852e69d479515fc72e8f45e4
2024-05-27 10:22:49 +00:00
Jakob Ackermann
b30d838c49 Merge pull request #11858 from overleaf/jpa-access-token-encryptor-cleanup
[access-token-encryptor] drop support for encryption scheme v2

GitOrigin-RevId: b720997e01239a7b6443138c68485d5ab0c813ed
2023-02-23 09:03:55 +00:00
Jakob Ackermann
82d59a18d9 Merge pull request #11536 from overleaf/jpa-access-token-encryptor-v3
[access-token-encryptor] rewrite module and add scheme v3

GitOrigin-RevId: d23ec86d63739a61f1e45f04ed41ea7d991ddb0e
2023-02-15 09:05:12 +00:00
Jakob Ackermann
01aebbf69d Merge pull request #11559 from overleaf/jpa-access-token-encryptor-remove-v1
[access-token-encryptor] drop support for legacy v1 token scheme

GitOrigin-RevId: 2d32453ad38119fa45cfd77463091f2c91dfe647
2023-02-02 18:22:42 +00:00
Jakob Ackermann
f0bd6dda23 Merge pull request #7986 from overleaf/jpa-eslint-8
[misc] upgrade eslint packages to the latest version everywhere

GitOrigin-RevId: f1480d4a171acef82fb26c4aa54be3a6088b0ab3
2022-05-17 08:05:59 +00:00
Brian Gough
d9d65ac31c Merge pull request #5246 from overleaf/bg-upgrade-logger-in-all-libraries
upgrade logger in libraries

GitOrigin-RevId: 5968f5abc5f77061cd90b5ebbccf86349619c4a7
2021-10-29 08:03:14 +00:00
Jakob Ackermann
0ecd6f34ff Merge pull request #4742 from overleaf/jpa-modernize-access-token-encryptor
[misc] modernize access token encryptor

GitOrigin-RevId: 178fe2ee2f97f2b3816e480b6283fdb127eb72d6
2021-08-17 08:03:17 +00:00
mserranom
c8617ff55e updated paths 2020-02-17 16:17:53 +01:00
decaffeinate
7df0e74feb decaffeinate: Run post-processing cleanups on AccessTokenEncryptor.coffee 2020-02-17 16:04:54 +01:00
decaffeinate
054bbee912 decaffeinate: Convert AccessTokenEncryptor.coffee to JS 2020-02-17 16:04:53 +01:00
decaffeinate
b51f05bf5e decaffeinate: Rename AccessTokenEncryptor.coffee from .coffee to .js 2020-02-17 16:04:53 +01:00
Simon Detheridge
b8d5f6baeb Split methods to reduce code duplication 2019-12-09 15:35:22 +00:00
Simon Detheridge
73f293cf49 Remove unneeded 'async' dependency
Co-Authored-By: Jakob Ackermann <das7pad@outlook.com>
2019-12-09 15:01:31 +00:00
Simon Detheridge
a9e39af24f Keep oldmethods and use old method when app uses an older label 2019-12-09 14:49:23 +00:00
Simon Detheridge
120890bb08 Update lib/coffee/AccessTokenEncryptor.coffee
Co-Authored-By: Jakob Ackermann <das7pad@outlook.com>
2019-12-05 08:57:19 +00:00
Simon Detheridge
c2fc2ed178 Replace deprecated createCipher with createCipheriv for new tokens
Co-authored-by: Alasdair Smith <ali@alasdairsmith.co.uk>
2019-12-04 10:09:39 +00:00
Shane Kilkelly
1735e8f56b Upgrade to node 10, specify digest in pbkdf2 2019-10-08 15:53:08 +01:00
Shane Kilkelly
e6e3fb6948 change to be a class, with settings passed in 2016-03-25 14:33:38 +00:00
Shane Kilkelly
fc3c0d1384 init (copied from thirdpartydatastore-sharelatex) 2016-03-25 11:04:46 +00:00