aboutsummaryrefslogtreecommitdiffstats
path: root/apps/oauth2/lib/Controller
Commit message (Collapse)AuthorAgeFilesLines
* chore: Apply rector configuration to apps folderCôme Chilliet2024-09-201-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-192-2/+2
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(oauth2): store hashed secret instead of encryptedJulien Veyssier2024-09-022-4/+5
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* invalidate oauth2 tokens only for seen usersArtur Neumann2024-08-161-1/+1
| | | | Signed-off-by: Artur Neumann <artur@jankaritech.com>
* refactor(oauth2): Replace security annotations with respective attributesprovokateurin2024-07-292-8/+12
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-313-68/+6
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Always catch OCP versions of authentication exceptionsCôme Chilliet2024-01-111-2/+2
| | | | | | And always throw OC versions for BC Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-232-9/+9
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* adjust phpdoc types in OauthApiControllerJulien Veyssier2023-10-051-4/+4
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* rename oauth2_access_token's created_at to code_created_atJulien Veyssier2023-10-051-3/+3
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* delete oauth access token when receiving a code that has expiredJulien Veyssier2023-10-051-0/+3
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* refuse oauth authorization code if a token has already been delivered ↵Julien Veyssier2023-10-051-1/+11
| | | | | | (active token) Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* cleanup access tokens that are still in authorization state and that have ↵Julien Veyssier2023-10-051-0/+5
| | | | | | expired Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* add tests for oauth2 authorization code expirationJulien Veyssier2023-10-051-1/+1
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* make oauth2 authorization code expire after 10 minutesJulien Veyssier2023-10-051-6/+28
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* techdebt(DI): Use public IThrottler interface which exists since Nextcloud 25Joas Schilling2023-08-281-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* oauth2: Add OpenAPI specjld31032023-07-122-12/+24
| | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* add bruteforce protection in OauthApiControllerJulien Veyssier2023-06-191-5/+17
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* encrypt oauth2 client secretsJulien Veyssier2023-06-072-62/+39
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* public interface to invalidate tokens of userArtur Neumann2023-03-141-9/+2
| | | | Signed-off-by: Artur Neumann <artur@jankaritech.com>
* invalidate existing tokens when deleting an oauth clientArtur Neumann2023-03-141-2/+26
| | | | Signed-off-by: Artur Neumann <artur@jankaritech.com>
* Fix typos in apps/ subdirectoryluz paz2022-09-051-1/+1
| | | | | | | Found via `codespell -q 3 -S l10n,./apps/files_external/3rdparty -L adn,ba,boxs,keypair,jus,optionel,ressource,tabel ./apps/` Signed-off-by: luz paz <luzpaz@github.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* More test fixingJoas Schilling2021-12-011-14/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Introduce ISecureRandom::CHAR_ALPHANUMERICJ0WI2021-07-081-2/+2
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-043-6/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update license headers for 19Christoph Wurst2020-04-292-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+0
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix invalid instantiation of TemplateResponse if client not foundDaniel Kesselberg2020-03-151-4/+3
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Update license headersChristoph Wurst2019-12-053-3/+21
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move oauth admin settings to initialstateRoeland Jago Douma2019-09-281-18/+0
| | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
* Strict controllersRoeland Jago Douma2018-12-072-15/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fail gracefull if an unkown oauth2 client tries to authenticateRoeland Jago Douma2018-12-061-3/+20
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move ExpiredTokenException to the correct namespaceRoeland Jago Douma2018-10-301-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Reset bruteforce on token refresh OAuthRoeland Jago Douma2018-10-301-1/+9
| | | | | | | | | | When using atoken obtained via OAuth the token expires. Resulting in brute force attempts hitting the requesting IP. This resets the brute force attempts for that UID on a valid refresh of the token. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove filter_var flags due to PHP 7.3 deprecation, fixes #10894Patrik Kernstock2018-09-041-1/+1
| | | | Signed-off-by: Patrik Kernstock <info@pkern.at>
* Update SettingsController.phprakekniven2018-06-301-1/+1
| | | | Grammar fix. Uppercase URL See https://www.transifex.com/nextcloud/nextcloud/translate/#de/$/146983238?q=issue%3Aopen
* Validate OAuth2 redirect uriRoeland Jago Douma2018-06-261-1/+12
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Cleanup ControllerRoeland Jago Douma2018-06-191-7/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Migrate OAuth Admin settings to vueRoeland Jago Douma2018-06-191-16/+35
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* The OAuth endpoint needs to support Basic AuthRoeland Jago Douma2018-05-291-0/+5
| | | | | | * Add test Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Don't use special chars to avoid confusionRoeland Jago Douma2018-05-221-0/+7
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Rotate tokenRoeland Jago Douma2018-05-221-11/+43
| | | | | | | | On a refresh token request: * rorate * reset expire Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Authenticate the clients on requesting a tokenRoeland Jago Douma2018-05-221-2/+45
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fail if the response type is not properly setRoeland Jago Douma2018-05-221-1/+10
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Set OAuth token expirationRoeland Jago Douma2018-05-221-1/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add OAuth state to sessionLukas Reschke2017-05-181-8/+9
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>