forked from LycheeOrg/Lychee
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve API client usability (LycheeOrg#1368)
* Support API tokens per user * Do not require Accept and Content-Type headers * Fix 500 on user creation * Recompile * Fix some reviews * Undo Content-Type and Accept change * Fix phpstan * Fix phpstan * Fix phpstan 3 * add support for disabling the token completely rather than letting it set as a random value * disable-enable FK * add tests * remove unused variable * Translate and add strings * Fix security issue during migration that gives admin perms to api_key * Fix locale * Sync frontend * Suggestions * Apply suggestions from code review Co-authored-by: Matthias Nagel <matthias.h.nagel@posteo.de> * Apply suggestions * Recompile frontend * Fix perms * Fix lint * Improve check * Simplify middleware * Assert JSON * fix format * Apply fixes from PHP-CS-Fixer (LycheeOrg#1444) * add JetBrain Open Source Community Support (LycheeOrg#1442) * add JetBrain Open Source Community Support Co-authored-by: Matthias Nagel <matthias.h.nagel@posteo.de> Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com> * Make VideoHandler support optional (LycheeOrg#1439) * Make VideoHandler support optional * Changes recommended by nagmat84 * Add a testcase for video upload without ffmpeg * Fix new testcase * Fix a typo * Update tests/Feature/PhotosAddHandlerTestAbstract.php Co-authored-by: Matthias Nagel <matthias.h.nagel@posteo.de> * Check for error message that FFmpeg is disabled * Fixed Google Motion Photo test Co-authored-by: Matthias Nagel <matthias.h.nagel@posteo.de> * Apply fixes from PHP-CS-Fixer Co-authored-by: Benoît Viguier <ildyria@users.noreply.github.com> Co-authored-by: Matthias Nagel <matthias.h.nagel@posteo.de> Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com> Co-authored-by: Kamil Iskra <kamil.01482@iskra.name> Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> Co-authored-by: github-actions[bot] <action@github.com> * Hash tokens * Sync frontend * Tmp commit to find out why it's failing * Second try to find failure * I'm pretty stupid at all * Fix db errors * Fix phpstan * Fix phpstan 2 * Fix phpstan 3 * Fix test * Add tests and fix issues as guest * sync frontend * fix phpdoc * Update locales and sync frontedn * Fix duplicated keys * Sync frontend * Add getAuthenticatedUser test * Don't send token with user, fix locales, synced frontend * Make PHPStan happy about something toally unrelated * Sync frontend * fix sync * Remove HasUserMiddleware * Fix tests * Added custom guard to handle session or token * Avoid unintended login as admin * Keep token-based authentication stateless + Fix tests * Added test for logout * Don't drop table * Recompile frontend * Revert "Recompile frontend" This reverts commit 039d72f. * Only migrate if not exists * Sync frontend to master * Undo change Co-authored-by: ildyria <beviguier@gmail.com> Co-authored-by: Matthias Nagel <matthias.h.nagel@posteo.de> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Benoît Viguier <ildyria@users.noreply.github.com> Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com> Co-authored-by: Kamil Iskra <kamil.01482@iskra.name> Co-authored-by: github-actions[bot] <action@github.com>
- Loading branch information
1 parent
ed4240e
commit 8c0bcb4
Showing
36 changed files
with
1,136 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
class BadRequestHeaderException extends LycheeBaseException | ||
{ | ||
public function __construct(string $msg, \Throwable $previous = null) | ||
{ | ||
parent::__construct(Response::HTTP_BAD_REQUEST, $msg, $previous); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.