diff --git a/composer.json b/composer.json index b39008c63e..0715f4a322 100644 --- a/composer.json +++ b/composer.json @@ -121,7 +121,8 @@ "mockery/mockery": "^1.6", "johnkary/phpunit-speedtrap": "^4.0", "mikey179/vfsstream": "^1.6", - "dms/phpunit-arraysubset-asserts": "^0.5.0" + "dms/phpunit-arraysubset-asserts": "^0.5.0", + "dvsa/authentication-ldap": "^3" }, "extra" : { "bamarni-bin": { diff --git a/composer.lock b/composer.lock index 283e1d3d5a..de103542b2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "848fe711251e487a8e77d70092c1d91f", + "content-hash": "09dafd059e7f1129bd2316ef96f48bfe", "packages": [ { "name": "aws/aws-crt-php", @@ -1804,33 +1804,38 @@ }, { "name": "dvsa/contracts", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/dvsa/contracts.git", - "reference": "3b50f84ba8bd3c6d2f0edba53bb785470f8562d2" + "reference": "9d458c81f019a3080c54585136126e4aa705260c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dvsa/contracts/zipball/3b50f84ba8bd3c6d2f0edba53bb785470f8562d2", - "reference": "3b50f84ba8bd3c6d2f0edba53bb785470f8562d2", + "url": "https://api.github.com/repos/dvsa/contracts/zipball/9d458c81f019a3080c54585136126e4aa705260c", + "reference": "9d458c81f019a3080c54585136126e4aa705260c", "shasum": "" }, "require": { "ext-json": "*", - "league/oauth2-client": "^2.6", + "league/oauth2-client": "^2.7", + "paragonie/random_compat": "^9.99", "php": "^7.2.5 || ^8.0" }, "conflict": { - "guzzlehttp/guzzle": "<6.2.1" - }, - "replace": { - "paragonie/random_compat": "9.99.99" + "guzzlehttp/guzzle": "<6.5.8", + "guzzlehttp/psr7": "<1.9.1" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4" + "bamarni/composer-bin-plugin": "^1.8.2" }, "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + } + }, "autoload": { "psr-4": { "Dvsa\\Contracts\\": "" @@ -1840,12 +1845,6 @@ "license": [ "MIT" ], - "authors": [ - { - "name": "DVSA", - "homepage": "https://www.gov.uk/government/organisations/driver-and-vehicle-standards-agency" - } - ], "description": "A set of abstractions that define core services provided by the DVSA", "keywords": [ "abstractions", @@ -1855,9 +1854,9 @@ ], "support": { "issues": "https://github.com/dvsa/contracts/issues", - "source": "https://github.com/dvsa/contracts/tree/v1.2.0" + "source": "https://github.com/dvsa/contracts/tree/v1.3.0" }, - "time": "2021-07-23T13:20:39+00:00" + "time": "2024-07-08T15:28:39+00:00" }, { "name": "dvsa/laminas-config-cloud-parameters", @@ -2215,26 +2214,26 @@ }, { "name": "firebase/php-jwt", - "version": "v6.10.0", + "version": "v6.10.1", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "a49db6f0a5033aef5143295342f1c95521b075ff" + "reference": "500501c2ce893c824c801da135d02661199f60c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/a49db6f0a5033aef5143295342f1c95521b075ff", - "reference": "a49db6f0a5033aef5143295342f1c95521b075ff", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/500501c2ce893c824c801da135d02661199f60c5", + "reference": "500501c2ce893c824c801da135d02661199f60c5", "shasum": "" }, "require": { - "php": "^7.4||^8.0" + "php": "^8.0" }, "require-dev": { - "guzzlehttp/guzzle": "^6.5||^7.4", + "guzzlehttp/guzzle": "^7.4", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "psr/cache": "^1.0||^2.0", + "psr/cache": "^2.0||^3.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0" }, @@ -2272,9 +2271,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.10.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.10.1" }, - "time": "2023-12-01T16:26:39+00:00" + "time": "2024-05-18T18:05:11+00:00" }, { "name": "gedmo/doctrine-extensions", @@ -2405,22 +2404,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.8.1", + "version": "7.9.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a629e5b69db96eb4939c1b34114130077dd4c6fc", + "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -2431,9 +2430,9 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "guzzle/client-integration-tests": "3.0.2", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -2511,7 +2510,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + "source": "https://github.com/guzzle/guzzle/tree/7.9.1" }, "funding": [ { @@ -2527,20 +2526,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:35:24+00:00" + "time": "2024-07-19T16:19:57+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "shasum": "" }, "require": { @@ -2548,7 +2547,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { @@ -2594,7 +2593,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.2" + "source": "https://github.com/guzzle/promises/tree/2.0.3" }, "funding": [ { @@ -2610,20 +2609,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:19:20+00:00" + "time": "2024-07-18T10:29:17+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.2", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "shasum": "" }, "require": { @@ -2638,8 +2637,8 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -2710,7 +2709,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" + "source": "https://github.com/guzzle/psr7/tree/2.7.0" }, "funding": [ { @@ -2726,7 +2725,7 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:05:35+00:00" + "time": "2024-07-18T11:15:46+00:00" }, { "name": "illuminate/collections", @@ -6298,6 +6297,56 @@ }, "time": "2022-05-10T14:09:20+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, { "name": "phprtflite/phprtflite", "version": "v1.3.3", @@ -8993,16 +9042,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -9053,7 +9102,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -9069,7 +9118,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php72", @@ -9222,16 +9271,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -9282,7 +9331,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" }, "funding": [ { @@ -9298,7 +9347,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-php81", @@ -9994,6 +10043,75 @@ }, "time": "2022-10-31T08:38:03+00:00" }, + { + "name": "carbonphp/carbon-doctrine-types", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2023-12-11T17:09:12+00:00" + }, { "name": "dms/phpunit-arraysubset-asserts", "version": "v0.5.0", @@ -10038,6 +10156,64 @@ }, "time": "2023-06-02T17:33:53+00:00" }, + { + "name": "dvsa/authentication-ldap", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/dvsa/authentication-ldap.git", + "reference": "be4dfcfd4362abe97b8f227db1236c4cbb55b608" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dvsa/authentication-ldap/zipball/be4dfcfd4362abe97b8f227db1236c4cbb55b608", + "reference": "be4dfcfd4362abe97b8f227db1236c4cbb55b608", + "shasum": "" + }, + "require": { + "dvsa/contracts": "^1.3", + "ext-json": "*", + "ext-ldap": "*", + "ext-openssl": "*", + "firebase/php-jwt": "^6.3", + "illuminate/support": "^8.49 || ^11.0", + "league/oauth2-client": "^2.6.1", + "nesbot/carbon": "^2.63 || ^3.4", + "php": "^8.2", + "symfony/ldap": "^7.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^11.1" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + } + }, + "autoload": { + "psr-4": { + "Dvsa\\Authentication\\Ldap\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A wrapper around LDAP", + "keywords": [ + "Authentication", + "dvsa", + "ldap" + ], + "support": { + "issues": "https://github.com/dvsa/authentication-ldap/issues", + "source": "https://github.com/dvsa/authentication-ldap/tree/v3.0.0" + }, + "time": "2024-07-23T09:24:58+00:00" + }, { "name": "hamcrest/hamcrest-php", "version": "v2.0.1", @@ -10089,6 +10265,74 @@ }, "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "illuminate/support", + "version": "v8.83.27", + "source": { + "type": "git", + "url": "https://github.com/illuminate/support.git", + "reference": "1c79242468d3bbd9a0f7477df34f9647dde2a09b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/support/zipball/1c79242468d3bbd9a0f7477df34f9647dde2a09b", + "reference": "1c79242468d3bbd9a0f7477df34f9647dde2a09b", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^1.4|^2.0", + "ext-json": "*", + "ext-mbstring": "*", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "nesbot/carbon": "^2.53.1", + "php": "^7.3|^8.0", + "voku/portable-ascii": "^1.6.1" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "suggest": { + "illuminate/filesystem": "Required to use the composer class (^8.0).", + "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0.2).", + "ramsey/uuid": "Required to use Str::uuid() (^4.2.2).", + "symfony/process": "Required to use the composer class (^5.4).", + "symfony/var-dumper": "Required to use the dd function (^5.4).", + "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "files": [ + "helpers.php" + ], + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Support package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2022-09-21T21:30:03+00:00" + }, { "name": "johnkary/phpunit-speedtrap", "version": "v4.0.1", @@ -10334,6 +10578,113 @@ ], "time": "2023-03-08T13:26:56+00:00" }, + { + "name": "nesbot/carbon", + "version": "2.72.5", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/afd46589c216118ecd48ff2b95d77596af1e57ed", + "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed", + "shasum": "" + }, + "require": { + "carbonphp/carbon-doctrine-types": "*", + "ext-json": "*", + "php": "^7.1.8 || ^8.0", + "psr/clock": "^1.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "require-dev": { + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.0", + "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", + "squizlabs/php_codesniffer": "^3.4" + }, + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev", + "dev-2.x": "2.x-dev" + }, + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "docs": "https://carbon.nesbot.com/docs", + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + } + ], + "time": "2024-06-03T19:18:41+00:00" + }, { "name": "phar-io/manifest", "version": "2.0.4", @@ -11838,23 +12189,338 @@ "time": "2020-09-28T06:39:44+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.2.3", + "name": "symfony/ldap", + "version": "v7.1.1", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + "url": "https://github.com/symfony/ldap.git", + "reference": "ff718b49f2313af921cb1921ecceb40a575c5fea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "url": "https://api.github.com/repos/symfony/ldap/zipball/ff718b49f2313af921cb1921ecceb40a575c5fea", + "reference": "ff718b49f2313af921cb1921ecceb40a575c5fea", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", + "ext-ldap": "*", + "php": ">=8.2", + "symfony/options-resolver": "^6.4|^7.0" + }, + "conflict": { + "symfony/options-resolver": "<6.4", + "symfony/security-core": "<6.4" + }, + "require-dev": { + "symfony/security-core": "^6.4|^7.0", + "symfony/security-http": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Ldap\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Charles Sarrazin", + "email": "charles@sarraz.in" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a LDAP client for PHP on top of PHP's ldap extension", + "homepage": "https://symfony.com", + "keywords": [ + "active-directory", + "ldap" + ], + "support": { + "source": "https://github.com/symfony/ldap/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55", + "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, + { + "name": "symfony/translation", + "version": "v6.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "a002933b13989fc4bd0b58e04bf7eec5210e438a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/a002933b13989fc4bd0b58e04bf7eec5210e438a", + "reference": "a002933b13989fc4bd0b58e04bf7eec5210e438a", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation-contracts": "^2.5|^3.0" + }, + "conflict": { + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/http-client-contracts": "<2.5", + "symfony/http-kernel": "<5.4", + "symfony/service-contracts": "<2.5", + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" + }, + "provide": { + "symfony/translation-implementation": "2.3|3.0" + }, + "require-dev": { + "nikic/php-parser": "^4.18|^5.0", + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/http-client-contracts": "^2.5|^3.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/intl": "^5.4|^6.0|^7.0", + "symfony/polyfill-intl-icu": "^1.21", + "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v6.4.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:49:08+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", "php": "^7.2 || ^8.0" }, "type": "library", @@ -11886,6 +12552,80 @@ } ], "time": "2024-03-03T12:36:25+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/87337c91b9dfacee02452244ee14ab3c43bc485a", + "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/1.6.1" + }, + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://opencollective.com/portable-ascii", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2022-01-24T18:55:24+00:00" } ], "aliases": [], diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index bfb3ce701a..bdbd217e20 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -1,5 +1,9 @@ '', 'proxy' => "", ], + /* + |-------------------------------------------------------------------------- + | Authentication Identity Provider + |-------------------------------------------------------------------------- + | + | Select an identity provider client that will be used to connect to an + | identity provider that implement the `OAuthClientInterface`. + | + | This config file is loaded after the module configuration, so overwriting + | the service manager alias in a global config file will overwrite the + | modules own config allowing this file to set the identity provider. + | + | Example adapters: + | - Dvsa\Authentication\Cognito\Client as CognitoClient + | - Dvsa\Authentication\Ldap\Client as LdapClient + | + */ + 'service_manager' => [ + 'aliases' => [ + OAuthClientInterface::class => LdapClient::class, + ], + ], 'auth' => [ + 'default_adapter' => 'ldap', 'adapters' => [ 'cognito' => [ 'adapter' => \Dvsa\Olcs\Auth\Adapter\CognitoAdapter::class, @@ -259,7 +286,29 @@ return [ 'proxy' => new \Laminas\Stdlib\ArrayUtils\MergeRemoveKey(), ], ], - 'openam' => new \Laminas\Stdlib\ArrayUtils\MergeRemoveKey(), + /* + |-------------------------------------------------------------------------- + | LDAP Local Credentials + |-------------------------------------------------------------------------- + | + | The login credentials that match the OpenLDAP container bundled as + | part of https://github.com/dvsa/vol-docker-compose. + | + | These are default LOCAL values, do not alter unless defaults have changed. + | + */ + 'ldap' => [ + 'adapter' => \Dvsa\Olcs\Auth\Adapter\LdapAdapter::class, + 'host' => 'openldap', + 'port' => 1389, + 'admin_dn' => 'cn=admin,dc=vol,dc=dvsa', + 'admin_password' => 'admin', + 'rdn' => 'cn', + 'object_class' => ['inetOrgPerson'], + 'base_dn' => 'ou=users,dc=vol,dc=dvsa', + 'encryption' => 'none', + 'secret' => 'SUPER_SECRET', + ], ], ], 'acquired_rights' => [ diff --git a/module/Api/src/Rbac/JWTIdentityProviderFactory.php b/module/Api/src/Rbac/JWTIdentityProviderFactory.php index 28f84b62c3..14b1dedc0b 100644 --- a/module/Api/src/Rbac/JWTIdentityProviderFactory.php +++ b/module/Api/src/Rbac/JWTIdentityProviderFactory.php @@ -2,7 +2,7 @@ namespace Dvsa\Olcs\Api\Rbac; -use Dvsa\Authentication\Cognito\Client; +use Dvsa\Contracts\Auth\OAuthClientInterface; use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; @@ -26,7 +26,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o return new JWTIdentityProvider( $container->get('RepositoryServiceManager')->get('User'), $container->get('Request'), - $container->get(Client::class) + $container->get(OAuthClientInterface::class) ); } } diff --git a/module/Auth/config/module.config.php b/module/Auth/config/module.config.php index 028da559e8..9b71914b3d 100644 --- a/module/Auth/config/module.config.php +++ b/module/Auth/config/module.config.php @@ -2,12 +2,17 @@ return [ 'service_manager' => [ + 'aliases' => [ + \Dvsa\Contracts\Auth\OAuthClientInterface::class => \Dvsa\Authentication\Cognito\Client::class, + ], 'factories' => [ \Dvsa\Olcs\Auth\Service\AuthenticationServiceInterface::class => \Dvsa\Olcs\Auth\Service\AuthenticationServiceFactory::class, \Laminas\Authentication\Adapter\ValidatableAdapterInterface::class => \Dvsa\Olcs\Auth\Adapter\ValidatableAdapterFactory::class, \Dvsa\Authentication\Cognito\Client::class => \Dvsa\Olcs\Auth\Client\CognitoClientFactory::class, \Dvsa\Olcs\Auth\Adapter\CognitoAdapter::class => \Dvsa\Olcs\Auth\Adapter\CognitoAdapterFactory::class, \Dvsa\Olcs\Auth\Service\PasswordService::class => \Dvsa\Olcs\Auth\Service\PasswordServiceFactory::class, + \Dvsa\Authentication\Ldap\Client::class => \Dvsa\Olcs\Auth\Client\LdapClientFactory::class, + \Dvsa\Olcs\Auth\Adapter\LdapAdapter::class => \Dvsa\Olcs\Auth\Adapter\LdapAdapterFactory::class, ], ], ]; diff --git a/module/Auth/src/Adapter/CognitoAdapter.php b/module/Auth/src/Adapter/CognitoAdapter.php index 84f94a8fb0..794685833f 100644 --- a/module/Auth/src/Adapter/CognitoAdapter.php +++ b/module/Auth/src/Adapter/CognitoAdapter.php @@ -10,6 +10,7 @@ use Dvsa\Contracts\Auth\AccessTokenInterface; use Dvsa\Contracts\Auth\Exceptions\ChallengeException; use Dvsa\Contracts\Auth\Exceptions\ClientException; +use Dvsa\Contracts\Auth\OAuthClientInterface; use Dvsa\Contracts\Auth\Exceptions\InvalidTokenException; use Dvsa\Contracts\Auth\ResourceOwnerInterface; use Dvsa\Olcs\Auth\Exception\ResetPasswordException; @@ -338,7 +339,7 @@ private function buildUserObject(AccessTokenInterface $token): array $resourceOwner = $this->client->getResourceOwner($token); return [ - 'Provider' => Client::class, + 'Provider' => OAuthClientInterface::class, 'Token' => $token, 'ResourceOwner' => $resourceOwner, 'AccessToken' => $token->getToken(), diff --git a/module/Auth/src/Adapter/LdapAdapter.php b/module/Auth/src/Adapter/LdapAdapter.php new file mode 100644 index 0000000000..24588645a9 --- /dev/null +++ b/module/Auth/src/Adapter/LdapAdapter.php @@ -0,0 +1,212 @@ +client = $client; + } + + public function authenticate(): Result + { + try { + $token = $this->client->authenticate($this->getIdentity(), $this->getCredential()); + return new Result(Result::SUCCESS, $this->buildUserObject($token)); + } catch (InvalidTokenException | ClientException $e) { + Logger::err( + sprintf( + 'There was an error attempting to login the user %s: %s', + $this->getIdentity(), + $e->getMessage() + ), + $e->getTrace() + ); + return new Result(Result::FAILURE, [], [$e->getMessage()]); + } + } + + public function changePassword(string $identifier, string $previousPassword, string $newPassword): ChangePasswordResult + { + try { + $this->client->authenticate($identifier, $previousPassword); + } catch (ClientException $e) { + Logger::debug('LDAP client: change password ClientException checking previous password: ' . $e->getMessage()); + return new ChangePasswordResult(ChangePasswordResult::FAILURE_CLIENT_ERROR, $e->getMessage()); + } catch (ChallengeException $e) { + // Do nothing as this means the password was valid + } + + if ($previousPassword === $newPassword) { + return new ChangePasswordResult(ChangePasswordResult::FAILURE_PASSWORD_REUSE, ChangePasswordResult::MESSAGE_PASSWORD_REUSE); + } + + try { + $this->client->changePassword($identifier, $newPassword); + return new ChangePasswordResult(ChangePasswordResult::SUCCESS, ChangePasswordResult::MESSAGE_GENERIC_SUCCESS); + } catch (ClientException $e) { + Logger::debug('Cognito client: change password ClientException: ' . $e->getMessage()); + + return new ChangePasswordResult(ChangePasswordResult::FAILURE, ChangePasswordResult::MESSAGE_GENERIC_FAIL); + } + } + + /** + * @throws ResetPasswordException + */ + public function resetPassword(string $identifier, string $newPassword): bool + { + try { + return $this->client->changePassword($identifier, $newPassword); + } catch (ClientException $e) { + Logger::debug('Ldap client: reset password ClientException: ' . $e->getMessage()); + throw new ResetPasswordException($e->getMessage()); + } catch (\Exception $e) { + Logger::err('Unknown reset password error from Cognito client: ' . $e->getMessage()); + throw new ResetPasswordException($e->getMessage()); + } + } + + /** + * @throws ClientException + */ + public function register(string $identifier, string $password, string $email, array $attributes = []): void + { + $attributes = array_merge(['email' => $email], $attributes); + $this->client->register($identifier, $password, $attributes); + } + + public function changeExpiredPassword(string $newPassword, string $challengeToken, string $username): ChangeExpiredPasswordResult + { + try { + $token = $this->client->authenticate($username, $newPassword); + } catch (ClientException $e) { + Logger::err('Ldap client: change password ClientException checking previous password: ' . $e->getMessage()); + return new ChangeExpiredPasswordResult(ChangeExpiredPasswordResult::FAILURE_CLIENT_ERROR, [], [$e->getMessage()]); + } + + return new ChangeExpiredPasswordResult(ChangeExpiredPasswordResult::SUCCESS, $this->buildUserObject($token)); + } + + public function refreshToken(string $refreshToken, string $identifier): Result + { + // No refresh token functionality in LDAP. + return new Result(Result::FAILURE, []); + } + + /** + * @throws ClientException + */ + public function changeAttribute(string $identifier, string $key, string $value): void + { + $this->client->changeAttribute($identifier, $key, $value); + } + + public function deleteUser(string $identifier): DeleteUserResult + { + throw new \RuntimeException('Not implemented'); + } + + /** + * @throws ClientException + */ + public function disableUser(string $identifier): void + { + $this->client->disableUser($identifier); + } + + /** + * @throws ClientException + */ + public function enableUser(string $identifier): void + { + $this->client->enableUser($identifier); + } + + /** + * @throws ClientException + */ + public function getUserByIdentifier(string $identifier): ResourceOwnerInterface + { + return $this->client->getUserByIdentifier($identifier); + } + + /** + * @throws ClientException + */ + public function registerIfNotPresent(string $identifier, string $password, string $email, array $attributes = []): bool + { + if (!$this->doesUserExist($identifier)) { + $this->register($identifier, $password, $email, $attributes); + return true; + } + return false; + } + + /** + * @throws ClientException + */ + public function doesUserExist(string $identifier): bool + { + try { + $this->getUserByIdentifier($identifier); + } catch (ClientException $e) { + throw $e; + } + + return true; + } + + /** + * @return mixed|string + */ + public function getIdentity() + { + $identity = parent::getIdentity(); + if (!empty($identity) && is_string($identity)) { + $identity = strtolower($identity); + } + return $identity; + } + + /** + * @throws InvalidTokenException + */ + private function buildUserObject(AccessTokenInterface $token): array + { + $idTokenClaims = $this->client->decodeToken($token->getIdToken()); + $accessTokenClaims = $this->client->decodeToken($token->getToken()); + $resourceOwner = $this->client->getResourceOwner($token); + + return [ + 'Provider' => OAuthClientInterface::class, + 'Token' => $token, + 'ResourceOwner' => $resourceOwner, + 'AccessToken' => $token->getToken(), + 'AccessTokenClaims' => $accessTokenClaims, + 'IdToken' => $token->getIdToken(), + 'IdTokenClaims' => $idTokenClaims, + 'RefreshToken' => $token->getRefreshToken(), + ]; + } +} diff --git a/module/Auth/src/Adapter/LdapAdapterFactory.php b/module/Auth/src/Adapter/LdapAdapterFactory.php new file mode 100644 index 0000000000..2d3b059b83 --- /dev/null +++ b/module/Auth/src/Adapter/LdapAdapterFactory.php @@ -0,0 +1,19 @@ +get(Client::class); + + return new LdapAdapter($client); + } +} diff --git a/module/Auth/src/Client/LdapClientFactory.php b/module/Auth/src/Client/LdapClientFactory.php new file mode 100644 index 0000000000..7897e3b815 --- /dev/null +++ b/module/Auth/src/Client/LdapClientFactory.php @@ -0,0 +1,38 @@ +get('Config')[self::CONFIG_NAMESPACE][static::CONFIG_ADAPTERS][static::CONFIG_ADAPTER]; + + $ldap = Ldap::create('ext_ldap', [ + 'host' => $config['host'], + 'port' => $config['port'], + 'encryption' => 'none', + ]); + + $ldap->bind($config['admin_dn'], $config['admin_password']); + + return new Client( + $ldap, + $config['rdn'], + $config['base_dn'], + $config['object_class'], + $config['secret'], + ); + } +} diff --git a/test/module/Api/src/Rbac/JWTIdentityProviderFactoryTest.php b/test/module/Api/src/Rbac/JWTIdentityProviderFactoryTest.php index 9165c16dbd..b361cee0a3 100644 --- a/test/module/Api/src/Rbac/JWTIdentityProviderFactoryTest.php +++ b/test/module/Api/src/Rbac/JWTIdentityProviderFactoryTest.php @@ -5,6 +5,7 @@ namespace Dvsa\OlcsTest\Api\Rbac; use Dvsa\Authentication\Cognito\Client; +use Dvsa\Contracts\Auth\OAuthClientInterface; use Dvsa\Olcs\Api\Domain\Repository\User; use Dvsa\Olcs\Api\Rbac\JWTIdentityProvider; use Dvsa\Olcs\Api\Rbac\JWTIdentityProviderFactory; @@ -73,7 +74,7 @@ protected function setUpDefaultServices(ServiceManager $serviceManager) { $this->repositoryServiceManager(); $this->serviceManager()->setService('Request', m::mock(Request::class)); - $this->serviceManager->setService(Client::class, m::mock(Client::class)); + $this->serviceManager->setService(OAuthClientInterface::class, m::mock(Client::class)); } private function repositoryServiceManager()