feat: optional AccountingFirmId badge for RequestSignature#26
Open
nio-dtp wants to merge 1 commit into
Open
Conversation
46e1133 to
e8547f8
Compare
There was a problem hiding this comment.
Pull request overview
Adds an optional AccountingFirmId badge to the request-signature authenticator so a configured firm identifier can be extracted from the request, attached to the Passport, and propagated into the resulting SignatureValidToken.
Changes:
- Introduces
AccountingFirmIdBadgeandAccountingFirmIdBadgeConfigplus wiring to conditionally add the badge during authentication. - Extends
SignatureValidTokento carry an optionalaccountingFirmId. - Adds DI configuration support (
badges.accounting_firm_id), unit tests, and README documentation for the new option.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/Units/Security/Firewall/RequestSignatureListener.php | Adds unit tests covering badge extraction and token propagation. |
| Security/SignatureValidToken.php | Adds optional accountingFirmId storage + accessor on the token. |
| Security/Firewall/RequestSignatureListener.php | Implements optional badge resolution and injects it into the token. |
| Security/Firewall/AccountingFirmIdBadgeConfig.php | Adds config value object for badge source/name. |
| Security/Badge/AccountingFirmIdBadge.php | Adds new passport badge carrying the firm id. |
| Resources/config/services/security.php | Updates base service definition to include the new optional ctor argument. |
| README.md | Documents new badges.accounting_firm_id configuration behavior. |
| phpstan-baseline.neon | Removes baseline entries now addressed via improved typing annotations. |
| DependencyInjection/Security/Factory/RequestSignatureFactory.php | Adds config schema + service definition for the badge config and better PHPStan typing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+77
to
+81
| if (null !== $this->accountingFirmIdBadgeConfig) { | ||
| $passport->addBadge(new AccountingFirmIdBadge($this->resolveAccountingFirmId( | ||
| $request, | ||
| $this->accountingFirmIdBadgeConfig, | ||
| ))); |
Author
There was a problem hiding this comment.
@Kevin-koko de ce que j'ai compris c'est Kong qui ajoute le header. Si c'est le cas, je pense qu'on a pas besoin de l'ajouter dans la signature. Ya un truc qui m'échappe peut-être ?
e8547f8 to
a65615d
Compare
Azoog
approved these changes
Jul 10, 2026
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.
Linked to https://github.com/fulll/gamme-plateforme/issues/920