Skip to content

Conversation

@hschoenenberger
Copy link
Contributor

No description provided.

hschoenenberger and others added 30 commits May 6, 2025 15:29
* feat: working identity creation

---------

Co-authored-by: Hervé Schoenenberger <[email protected]>
Co-authored-by: Antoine Metifeu <[email protected]>
Co-authored-by: hschoenenberger <[email protected]>
* feat: working identity creation

* feat: refactor after review

* feat: csfixer and test

* feat: remove reonboard methods

* feat: php cs fixer

* feat: php stan + remove reonboard

* fix: phpstan

* feat: update phpunit

* feat: phpstan fix

* feat: phpunit test fix

* Update config/command.yml

Co-authored-by: Hervé Schoenenberger <[email protected]>

* Update config/command.yml

Co-authored-by: Hervé Schoenenberger <[email protected]>

* fix: change endpoint path

* fix: refactor multi handler

* fix: refactor multi handler

* fix: refactor multi handler

* fix: remove abstract suffix

* fix: injected dependencies

* fix: unit tests, php-cs-fixer, phpstan

* fix: unit tests, php-cs-fixer, phpstan

* feat: improve scoping & hack autoloading for upgrade

* feat: improve scoping & hack autoloading for upgrade

* feat: verify url authenticity

* fix: adapt command handler

* fix: unlinked on error conf key

* feat: improve scoping & hack autoloading for upgrade

* feat: improve scoping & hack autoloading for upgrade

* feat: add v2 of abstract rest controller

* chore: reset prefix

* refactor: return early

* fix: more readable throwable catching

* fix: more readable throwable catching

* fix: php-cs-fixer

* fix: scoper config

* fix: phpstan

* fix: inverted condition

* fix: skip a few tests

* feat: add x-multishop-enabled header

* feat: cleanup handler and throw exception on failure

* feat: cleanup handler and throw exception on failure

* chore: adapt service container wiring

* chore: post merge fixes

* chore: rename to cloudShopId

* refactor: some refactoring
configure token verification
test a header display hook

* chore: some raw wiring

* chore: some renaming

* chore: some renaming

* fix: php-cs-fixer

* fix: post merge fixes

* fix: cleanup tests

* fix: cleanup tests

* fix: cleanup tests

* fix: cleanup tests

* fix: cleanup tests

* refactor: StatusManager & AccountsService replacement for AccountsClient

* fix: create identity

* fix: alpha debugging info

* feat: more debugging errors

* fix: use alternative Authorization header

* fix: verify route name

* fix: shop access token audience

* fix: renaming

* fix: disable scope and audience for now

* fix: phpstan & php-cs-fixer

* chore: activate display hook for alpha debugging

* fix: alpha status manager cache

* chore: some cleanup

* fix: tests

* fix: phpstan

* chore: StatusManager & VerifyIdentityHandler tests and associated fixes

* fix: phpstan & php-cs-fixer

* fix: phpstan & php-cs-fixer

* chore: remove useless query

* fix: typo

* fix: delete proof after verification & various renaming

* fix: delete proof after verification & various renaming

* fix: delete proof after verification & various renaming

* fix: delete proof after verification & various renaming

* refactor: audience configuration

* fix: update bulle configuration

* fix: disable php-scoper-update-prefix target

* fix: update status based on verification response

* fix: update status based on verification response

* fix: update status based on verification response

* feat: shop status route

* feat: tracking v8 (#488)

* fix: disable php-scoper-update-prefix target

* Update src/Service/Accounts/AccountsService.php

Thanks RV

Co-authored-by: Hervé Schoenenberger <[email protected]>

* fix: disable php-scoper-update-prefix target

* fix: anonymous id cookie on '/'

---------

Co-authored-by: hschoenenberger <[email protected]>
Co-authored-by: Hervé Schoenenberger <[email protected]>

* fix: tests

* fix: backend url generation

* chore: update fixme

* feat: attempt to get live status & fix empty datetime

* feat: attempt to get live status & fix empty datetime

* fix: shop verification error

* fix: clear cached status

* feat: invalidate cache (#498)

* fix: serialized date format

* fix: cached data for individual getters

* fix: remove try catch block

* fix: remove try catch block

---------

Co-authored-by: atourneriePresta <[email protected]>
Co-authored-by: atourneriePresta <[email protected]>
Co-authored-by: Hervé Schoenenberger <[email protected]>
Co-authored-by: hschoenenberger <[email protected]>
* feat: verif implicit

* fix: trigger verify command if identity exists

---------

Co-authored-by: hschoenenberger <[email protected]>
* fix: unit tests, php-cs-fixer, phpstan

* feat: improve scoping & hack autoloading for upgrade

* feat: improve scoping & hack autoloading for upgrade

* feat: verify url authenticity

* fix: adapt command handler

* fix: unlinked on error conf key

* feat: improve scoping & hack autoloading for upgrade

* feat: improve scoping & hack autoloading for upgrade

* refactor: get rid of module-lib-service-container

* refactor: remove useless deps

* fix: phpstan, php-cs-fixer & feature tests

* fix: phpstan, php-cs-fixer & feature tests

* fix: phpstan, php-cs-fixer & feature tests

* fix: phpstan, php-cs-fixer & feature tests

* fix: php-cs-fixer

* fix: cleanup

* refactor: create provider files

* refactor: create provider files

* chore: empty services files

* chore: empty services files

* chore: empty services files

* feat: add v2 of abstract rest controller

* chore: empty services files

* fix: cherry pick some fixes

* fix: cherry pick some fixes

* refactor: wip

* chore: cleanup namespaces

* chore: reset prefix

* refactor: return early

* fix: more readable throwable catching

* fix: more readable throwable catching

* fix: php-cs-fixer

* fix: scoper config

* fix: phpstan

* fix: inverted condition

* fix: skip a few tests

* feat: add x-multishop-enabled header

* feat: cleanup handler and throw exception on failure

* feat: cleanup handler and throw exception on failure

* chore: adapt service container wiring

* chore: post merge fixes

* chore: rename to cloudShopId

* refactor: some refactoring
configure token verification
test a header display hook

* chore: some raw wiring

* chore: some renaming

* chore: some renaming

* feat: alpha proposal

* refactor: move exceptions classes & instantiate real response alike objects

* refactor: move exceptions classes & instantiate real response alike objects

* refactor: phpstan & php-cs-fixer

* fix: tests

* fix: tests

* fix: tests

* fix: tests

* fix: json post

* fix: json post

* fix: php-cs-fixer

* fix: json post

* fix: php-cs-fixer

* fix: phpstan

* fix: phpstan

* chore: cleanup commented code

* fix: default values much match legacy behaviour

* fix: default values much match legacy behaviour

* fix: default values much match legacy behaviour

* refactor: userinfo without s

* fix: update header-stamps

* fix: php-cs-fixer

* chore: bump to milestone

* refactor: move responses objects

* refactor: extract AccountLogin domain

* fix: tests

* fix: tests

* refactor: response type legacy management

* feat: token validator

* feat: header-stamp

* feat: unit tests

* feat: unit tests

* refactor: circuit breaker exceptions handling & http client exceptions

* fix: header-stamps

* fix: header-stamps

* fix: http client post

* fix: http client post

* fix: http client post

* feat: clear oauth2cache on reset

* fix: safety check

* fix: safety check

* fix: check empty response

* feat: secured healthcheck

* feat: unit tests & fix token validator

* feat: unit tests & fix token validator

* feat: pollyfill for 56

* feat: querystring option

* fix: set issued at by default

* fix: query string usage with test http client

* fix: query string usage with test http client

* fix: query string usage with test http client

* fix: query string usage with test http client

* fix: phpstan

* fix: audience in tests

* fix: audience in tests

* fix: audience in tests

* fix: cached file broken null ttl

* fix: don't write JWKS on error

* feat: phpdoc for ttl parameter

* feat: add default scopes and be sure we set redirect_uri everytime

* feat: add default scopes and be sure we set redirect_uri everytime

* fix: safety check

* fix: safety check

* fix: safety check

* fix: enforce redirect_uri usage

* fix: enforce redirect_uri usage

* fix: default scopes for authorization uri only

* fix: tests

* feat: preserve service with deprecation notice

* feat: preserve service with deprecation notice

* feat: preserve service with deprecation notice

* feat: preserve service with deprecation notice

* fix: exception namespace

* fix: dropped class

* chore: rollback Installer

* feat: client config classes

* fix: header-stamps

* fix: header-stamps

* refactor: Dto class

* refactor: Dto class

* refactor: Dto class

* refactor: Dto class

* refactor: reorganize code

* refactor: tests src directory

* refactor: tests src directory

* refactor: tests src directory

* fix: restore tests composer.lock

* fix: restore tests composer.lock

* fix: restore tests composer.lock

* refactor: move ConfigObject specific type

* fix: post merge main

* fix: post merge main

* fix: post merge main

* chore: todo

* feat: query parameter

* fix: post merge

* fix: post merge

* fix: ci php-cs-fixer to use makefile target

* fix: ci php-cs-fixer to use makefile target

* fix: makefile & ci

* fix: symfony deprecation

* fix: php-cs-fixer

* refactor: some client refactoring

* refactor: some client refactoring

* refactor: some client refactoring

* test: more tests

* test: more tests

* test: more tests

* feat: implement contact identification

* fix: php-cs-fixer

* fix: php-cs-fixer

* fix: php-cs-fixer

* fix: post merge fixes

* fix: cleanup tests

* fix: cleanup tests

* fix: cleanup tests

* fix: cleanup tests

* fix: cleanup tests

* refactor: StatusManager & AccountsService replacement for AccountsClient

* fix: create identity

* fix: alpha debugging info

* feat: more debugging errors

* fix: use alternative Authorization header

* fix: verify route name

* fix: shop access token audience

* fix: renaming

* fix: disable scope and audience for now

* fix: phpstan & php-cs-fixer

* chore: activate display hook for alpha debugging

* fix: alpha status manager cache

* chore: some cleanup

* fix: tests

* fix: phpstan

* chore: StatusManager & VerifyIdentityHandler tests and associated fixes

* fix: phpstan & php-cs-fixer

* fix: phpstan & php-cs-fixer

* chore: remove useless query

* fix: typo

* fix: delete proof after verification & various renaming

* fix: delete proof after verification & various renaming

* fix: delete proof after verification & various renaming

* fix: delete proof after verification & various renaming

* refactor: audience configuration

* fix: update bulle configuration

* fix: disable php-scoper-update-prefix target

* fix: update status based on verification response

* fix: update status based on verification response

* fix: update status based on verification response

* fix: remove duplicate tests

* feat: shop status route

* feat: tracking v8 (#488)

* fix: disable php-scoper-update-prefix target

* Update src/Service/Accounts/AccountsService.php

Thanks RV

Co-authored-by: Hervé Schoenenberger <[email protected]>

* fix: disable php-scoper-update-prefix target

* fix: anonymous id cookie on '/'

---------

Co-authored-by: hschoenenberger <[email protected]>
Co-authored-by: Hervé Schoenenberger <[email protected]>

* fix: tests

* fix: backend url generation

* chore: update fixme

* fix: getRedirectUri compat v9

* fix: getRedirectUri compat v9

* fix: getRedirectUri compat v9

* feat: attempt to get live status & fix empty datetime

* feat: attempt to get live status & fix empty datetime

* feat: invalidate cache (#498)

* fix: serialized date format

* fix: cached data for individual getters

* refactor: more complex proof

* fix: exception catching

* [ACCOUNT-2832] feat: identify contact part 2 (#495)

* feat: add IdentifyContact command and handler for setting point of contact

* fix: php-cs-fixer

* feat: add unit tests for identifyContactHandler

* fix: lint code

* fix: lint code

* fix: cs-fixer

* fix: simplify handle method in IdentifyContactHandler

* fix: adapt test for simplified handle method

* fix: implement IdentifyContactCommand in OAuth2Controller

* fix: add CommandBus property to AdminOAuth2PsAccountsController and OAuth2Controller

* fix: update return type of setPointOfContact to void in AccountsService

* fix: update handle method to use getStatus instead of getCachedStatus in IdentifyContactHandler

* fix: refacto IdentifyContactHandlerTest

* fix: refactor php cs fixer / phpstan

* feat: initialize command bus in constructor of AdminOAuth2PsAccountsController and OAuth2Controller

* feat: invalidate cache after setting point of contact in IdentifyContactHandler

* feat: delete unused class IdentifyContact

* feat: update cached shop status handling in IdentifyContactHandlerTest

* chore: cleanup POC vars

* chore: cleanup POC vars

* chore: cleanup POC vars

* [ACCOUNT-2825] Get context query (#494)

* feat: attempt to get live status & fix empty datetime

* feat: attempt to get live status & fix empty datetime

* feat: get context query ajax endpoint + query

* fix: serialize datetime as iso 8601 string

* feat: add identify url + ps version from file

* feat: add identify url + ps version from file

* feat: replace existing GetContext action

* Component init (#497)

C'est Guillaume-L <[email protected]> qui m'a obligé à merge 🔫

* feat: add component_params_init to ps accounts presenter

* fix: phpcs

* feat: add ini params in PsAccountsService and pass to vue component init

* Pass settings as second params of init

Co-authored-by: Guillaume-L <[email protected]>

* fix: let shopid and groupId as integer

---------

Co-authored-by: Guillaume-L <[email protected]>

* fix: rename getAccountUrl to getAccountsUiUrl

* fix: after review

* fix: lint

* fix: lint

* fix: remove twice window ps accounts context

---------

Co-authored-by: hschoenenberger <[email protected]>
Co-authored-by: Guillaume-L <[email protected]>

---------

Co-authored-by: Antoine Metifeu <[email protected]>
Co-authored-by: Sullivan <[email protected]>
Co-authored-by: Guillaume-L <[email protected]>
* fix: add store/ scope

* fix: token audience & multishop bo uri

* fix: tests

* fix: phpstan

* fix: cleanup

---------

Co-authored-by: hschoenenberger <[email protected]>
* fix: don't disconnect bo when identify contact flow fails

* fix: don't disconnect bo when identify contact flow fails

* fix: v9 oauth controller
* feat: fallback session for ps16

* feat: check expiration date from cached status

* refactor: move session build into provider

* fix: existing tests

* fix: existing tests

* feat: cleanup session

* feat: distinct session by employee_id

* fix: phpstan

* feat: unit tests
* feat: add get shop tokens query

* test: fix

* fix: move get cloud shop id in trycatch block

* fix: add x-shop-id header

* fix: legacy firebase tokens class

* fix: legacy firebase tokens class

* fix: remove useless x-shop-id header

* Update src/Service/Accounts/Resource/FirebaseTokens.php

---------

Co-authored-by: hschoenenberger <[email protected]>
Co-authored-by: Hervé Schoenenberger <[email protected]>
* feat: add command for migrate shop identity

* fix: update MigrateShopIdentityHandler to use MigrateShopIdentityCommand and ConfigurationRepository

* feat: add tokenAudience parameter to MigrateShopIdentitiesCommand and update handlers

* fix: lint error

* fix: remove unnecessary blank lines in CommandProvider

* fix: remove unused  dependency from  and update CommandProvider

* feat: happy path & TODO

* feat: happy path & TODO

* feat: happy path & TODO

* feat: happy path & TODO

* refactor: remove unused upgradeShopModule method

* feat: migrate from v5 & v6 et set last upgrade

* feat: migrate from v5 & v6 et set last upgrade

* feat: handler basic tests

* feat: handler basic tests

* feat: handler basic tests

* feat: handler basic tests

* feat: handler basic tests

* feat: refactor App.vue to use PuikTabNavigation and update ps_accounts.php for code consistency

* feat: give proof on migration request

* feat: fix style

* feat: fix style

* feat: commented tabNavigation

* feat: test inputs (to be refactored)

* feat: implement fromVersion

* feat: CI fixes

* refactor: rename command

* feat: test audience

* feat: test inputs

* feat: test inputs

* feat: rename handler

* feat: CI fixes

* feat: refactor upgrade logic to handle shop existence check

* fix: remove unused property

* feat: refactor identity migration on upgrade and create identity if necessary

* feat: rename commands & call migrate on reset

* fix: phpstan

* fix: last upgraded version

* fix: minor fixes & call singular command inside singular command

* fix: renaming for clarity

* fix: getLastUpgrade always return a version number (0 by default)

* fix: shop contextualized data

* fix: shop contextualized data & fixed uncached call

* fix: shop contextualized data & fixed uncached call

* fix: cut error output rendering

* fix: simplify identity migration logic and improve version checks

* fix: migrate route name

* fix: unused import

* fix: tests

* fix: improve version upgrade logic and add debug/health check links in header hook

* fix: improve version upgrade logic and add debug/health check links in header hook

* fix: phpstan

---------

Co-authored-by: hschoenenberger <[email protected]>
Co-authored-by: Sullivan <[email protected]>
…dme (#508)

* feat: add shop status accessors into PsAccountsService and update readme

* feat: add shop identity methods and require shop.verified scope

* feat: add shop identity methods and require shop.verified scope

* test: include isVerified field in ShopStatus mock

* test: replace shop data with shop UUID in ShopVerifyProof tests
* feat: add shop status accessors into PsAccountsService and update readme

* feat: add shop identity methods and require shop.verified scope

* feat: add shop identity methods and require shop.verified scope

* test: include isVerified field in ShopStatus mock

* test: replace shop data with shop UUID in ShopVerifyProof tests

* feat: replace the refresh token expiry check with an extended validity check

* feat: add missing getValidTokenTests

* docs: update token compatibility table in README
* fix: lazy statusManager getter

* fix: php-cs-fixer

* fix: phpunit
* feat: use environment to include alert level for debug bar
* feat: get last upgraded version from ps_module table

* feat: introduce UpgradeService
* feat: add verify shop action on ajax controller & add verify shop url on context

* fix: change verify to migrate or create

* fix: remove unnecessary blank line in AdminAjaxPsAccountsController

* feat: add migrateOrCreateIdentityV8Url to ShopProvider and remove from PsAccountsService

* chore: cleanup commented code

* refactor: rename migrateOrCreateIdentityV8 to fallbackCreateIdentity in AdminAjaxPsAccountsController and ShopProvider

* fix: replace Error with Exception for better error handling in ajaxProcessGetOrRefreshToken

* [ACCOUNT-3014] Let errors bubble up to ajax response (#523)

* feat: let exception in single store command bubble up

---------

Co-authored-by: hschoenenberger <[email protected]>
Co-authored-by: Antoine <[email protected]>
* feat: return a context event with an empty status

* feat: return a context event with an empty status

* feat: add frontendUrl into empty status

* fix: manage correctly refresh property
* feat: add source for tracking module usage

* feat: add source everywhere

* feat: add source on shop status (#525)

* feat: add source on shop status

* feat: add source everywhere

* fix: lint

* fix: keep simple source
* feat: finish providing missing source tracking

* fix: tests

* fix: missing source argument
* feat: remove admin debug controller

* feat: remove debug link
hschoenenberger and others added 14 commits August 21, 2025 16:16
* feat: locales first iteration

* feat: new back controller with cors

* fix: return shops with null status if not exist

* get context query params contextType and contextId

* fix: popup should not reload parent page

* fix: return type of postProcess

* feat: check allowed origin for cors (#530)

* Apply suggestion from @hschoenenberger

Co-authored-by: Hervé Schoenenberger <[email protected]>

* Apply suggestion from @hschoenenberger

Co-authored-by: Hervé Schoenenberger <[email protected]>

* fix: source on getStatus

* [ACCOUNT-3051] feat: add new token to securize new admin controller (#532)

* feat: add new token to securize new admin controller

* feat: add new token to securize new admin controller

* fix: specific constants for global configurations

* [ACCOUNT-3038] feat: context with empty status (#531)

* feat: return a context event with an empty status

* feat: return a context event with an empty status

* feat: add frontendUrl into empty status

* fix: manage correctly refresh property

* fix: specific constants for global configurations

* fix: fallback and get context urls without token

* fix: use openssl to generate signing key

* fix: rename TokenService as AdminTokenService

* fix: add missing @throws tags

* fix: add protected method to generate signature and clean code

* fix: default provider

* fix: fallbackCreateIdentity

* fix: PS v6

* fix: path

* fix: remove token on urls

* fix: declaration of AdminTokenService

* fix: better random proof and signature

* fix: cors header

* fix: remove useless use of uuid in proof manager

* fix: add source on get context url

* fix: upgrade scripty don't return false

* fix: pass source on manual identification / verification

* fix: ps_accounts as default source

* fix: common trait to read request headers

* fix: require_once

---------

Co-authored-by: hschoenenberger <[email protected]>
Co-authored-by: Hervé Schoenenberger <[email protected]>

* feat: smoke test for get context

* fix: missing require_once

* fix: override init method for ps 1.6

* feat: add a more complete testsuite

* feat: add a more complete testsuite

* feat: add a more complete testsuite

* feat: add a more complete testsuite

---------

Co-authored-by: Antoine Metifeu <[email protected]>
* feat: remove fallback vue component

* feat: error message when CDN can't be loaded
# Conflicts:
#	_dev/package.json
#	config.xml
#	ps_accounts.php
#	src/Http/Controller/AbstractRestController.php
#	src/Repository/ConfigurationRepository.php
* feat: improve upgrade script
* fix: reset migrate from v5

* fix: unit test
* feat: manual verification flag

* feat: force manualVerification at true when calling ajax action
* feat: optimistic set point of contact

* feat: type in backOfficeUrl property

* fix: upset cached status property set to merge

* fix: unit tests and sf oauth controller for ps9
* feat: working js version

* feat: improve upgrade script

* feat: add a proper header-alert app

* feat: cleanup obsolete hooks

* feat: js notification system & cleanup deprecated hooks

* chore: cleanup FIXME

* chore: update error code

* chore: add fixme

* chore: remove tests on deleted code

* fix: retrim final slash before comparing

* feat: trigger verification command after identity update

* feat: add origin tracking property & remove unused commands

* chore: remove commented code

* feat: origin property everywhere

* feat: missing origin and source headers

* feat: add a "force" property to VerifyIdentityComman

* feat: alert style

* fix: use the available btn-warning class for legacy context

* feat: call translation helper on notification strings

* fix: call php-cs-fixer

* feat: update master (en) translation file
* feat: add store name

* feat: unit tests for name property & missing test for renew identity

---------

Co-authored-by: hschoenenberger <[email protected]>
@hschoenenberger hschoenenberger changed the title feat: improve migration need detection & from version feat: alt migration need detection & from version Sep 4, 2025
Base automatically changed from major/v8 to main September 15, 2025 12:19
…ion-test

# Conflicts:
#	_dev/apps/notifications/index.ts
#	controllers/admin/AdminAjaxPsAccountsController.php
#	controllers/admin/AdminOAuth2PsAccountsController.php
#	controllers/front/apiV2ShopProof.php
#	ps_accounts.php
#	src/Account/CommandHandler/IdentifyContactHandler.php
#	src/Account/CommandHandler/MigrateOrCreateIdentityV8Handler.php
#	src/Hook/DisplayBackOfficeHeader.php
#	src/Http/Controller/AbstractRestController.php
#	src/Polyfill/ConfigurationStorageSession.php
#	src/ServiceProvider/CommandProvider.php
#	tests/src/Feature/Api/V1/ShopLinkAccount/DeleteTest.php
#	tests/src/Feature/Api/V1/ShopLinkAccount/StoreTest.php
#	tests/src/Feature/Api/V1/ShopOauth2Client/DeleteTest.php
#	tests/src/Feature/Api/V1/ShopOauth2Client/StoreTest.php
#	tests/src/Feature/Api/V1/ShopToken/ShowTest.php
#	tests/src/Feature/Api/V1/ShopUrl/ShowTest.php
#	tests/src/Unit/Account/CommandHandler/IdentifyContactHandlerTest.php
#	translations/en.php
@sonarqubecloud
Copy link

@hschoenenberger hschoenenberger added the invalid This doesn't seem right label Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants