feat(api-bundle): add Bearer token authentication support for Storage API#462
Merged
ondrajodas merged 6 commits intomainfrom Jan 28, 2026
Merged
feat(api-bundle): add Bearer token authentication support for Storage API#462ondrajodas merged 6 commits intomainfrom
ondrajodas merged 6 commits intomainfrom
Conversation
3c8780a to
b16dfaa
Compare
odinuv
reviewed
Jan 26, 2026
| continue; | ||
| } | ||
|
|
||
| // Get token from primary header or Authorization header |
Member
There was a problem hiding this comment.
Já jsem si původně představoval, že to bude jinej authenticator, jenže to by se pak musel přidat do všech controlerů a to by bylo omrd a nic by to nepřineslo, takže to je vlastně takhle dobrý - akorát se mě moc nelibí, že je to takhle v tom Authenticatoru - co na to jít spíš takhle #463 ?
Contributor
Author
There was a problem hiding this comment.
ok, dobrý nápad 👍 udělal jsem to tak
odinuv
reviewed
Jan 27, 2026
Member
odinuv
left a comment
There was a problem hiding this comment.
dobrý, tak ještě prosím to pořadí ať je konzistentní
| return $token; | ||
| } | ||
|
|
||
| // Check Authorization header |
Member
There was a problem hiding this comment.
| self::assertSame('some-token-without-bearer', $authenticator->extractToken($request)); | ||
| } | ||
|
|
||
| public function testExtractTokenPrefersStorageApiTokenHeader(): void |
Member
There was a problem hiding this comment.
odinuv
approved these changes
Jan 28, 2026
22e897f to
c38e120
Compare
…nticators Simplify TokenAuthenticatorInterface by replacing getTokenHeader() and getAuthorizationHeader() with a single extractToken(Request) method. Each authenticator now handles its own token extraction logic, making the code cleaner and more flexible.
c38e120 to
a5d35c5
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Authorization: Bearerheader as an alternative toX-StorageApi-TokenTokenAuthenticatorInterfacewithgetAuthorizationHeader()method to allow authenticators to specify Authorization header supportAttributeAuthenticatorto check both primary header and Authorization header, preventing simultaneous use of bothChanges
getAuthorizationHeader()methodstorage-api-php-client-branch-wrapperfrom require-dev to require for Bearer token support🤖 Generated with Claude Code