PK nuTK8%
LICENSE.mdnu ٘ Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of Laminas Foundation nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PK nuTF[ [ COPYRIGHT.mdnu ٘ Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/)
PK nuT߇ .laminas-ci.jsonnu ٘ {
"exclude": [
{"name": "PHPUnit on PHP 5.6 with locked dependencies"},
{"name": "PHPUnit on PHP 7.0 with locked dependencies"},
{"name": "PHPUnit on PHP 7.1 with locked dependencies"}
]
}
PK nuTʻ
composer.locknu ٘ {
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "bbbf250be5e96c4a2433aeaf86dadce2",
"packages": [
{
"name": "container-interop/container-interop",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/container-interop/container-interop.git",
"reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8",
"reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8",
"shasum": ""
},
"require": {
"psr/container": "^1.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Interop\\Container\\": "src/Interop/Container/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
"homepage": "https://github.com/container-interop/container-interop",
"support": {
"issues": "https://github.com/container-interop/container-interop/issues",
"source": "https://github.com/container-interop/container-interop/tree/master"
},
"abandoned": "psr/container",
"time": "2017-02-14T19:40:03+00:00"
},
{
"name": "laminas/laminas-config",
"version": "3.7.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-config.git",
"reference": "e43d13dcfc273d4392812eb395ce636f73f34dfd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-config/zipball/e43d13dcfc273d4392812eb395ce636f73f34dfd",
"reference": "e43d13dcfc273d4392812eb395ce636f73f34dfd",
"shasum": ""
},
"require": {
"ext-json": "*",
"laminas/laminas-stdlib": "^3.6",
"php": "^7.3 || ~8.0.0 || ~8.1.0",
"psr/container": "^1.0"
},
"conflict": {
"container-interop/container-interop": "<1.2.0",
"zendframework/zend-config": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
"laminas/laminas-filter": "^2.7.2",
"laminas/laminas-i18n": "^2.10.3",
"laminas/laminas-servicemanager": "^3.7",
"phpunit/phpunit": "^9.5.5"
},
"suggest": {
"laminas/laminas-filter": "^2.7.2; install if you want to use the Filter processor",
"laminas/laminas-i18n": "^2.7.4; install if you want to use the Translator processor",
"laminas/laminas-servicemanager": "^2.7.8 || ^3.3; if you need an extensible plugin manager for use with the Config Factory"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Config\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "provides a nested object property based user interface for accessing this configuration data within application code",
"homepage": "https://laminas.dev",
"keywords": [
"config",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-config/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-config/issues",
"rss": "https://github.com/laminas/laminas-config/releases.atom",
"source": "https://github.com/laminas/laminas-config"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-10-01T16:07:46+00:00"
},
{
"name": "laminas/laminas-crypt",
"version": "3.6.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-crypt.git",
"reference": "ad2c29c289a4bc837b37a7650f5178edda0fc548"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-crypt/zipball/ad2c29c289a4bc837b37a7650f5178edda0fc548",
"reference": "ad2c29c289a4bc837b37a7650f5178edda0fc548",
"shasum": ""
},
"require": {
"container-interop/container-interop": "^1.2",
"ext-mbstring": "*",
"laminas/laminas-math": "^3.4",
"laminas/laminas-stdlib": "^3.6",
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"zendframework/zend-crypt": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-openssl": "Required for most features of Laminas\\Crypt"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Crypt\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Strong cryptography tools and password hashing",
"homepage": "https://laminas.dev",
"keywords": [
"crypt",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-crypt/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-crypt/issues",
"rss": "https://github.com/laminas/laminas-crypt/releases.atom",
"source": "https://github.com/laminas/laminas-crypt"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-12-06T01:25:27+00:00"
},
{
"name": "laminas/laminas-escaper",
"version": "2.9.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-escaper.git",
"reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/891ad70986729e20ed2e86355fcf93c9dc238a5f",
"reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f",
"shasum": ""
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"zendframework/zend-escaper": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.3.0",
"phpunit/phpunit": "^9.3",
"psalm/plugin-phpunit": "^0.12.2",
"vimeo/psalm": "^3.16"
},
"suggest": {
"ext-iconv": "*",
"ext-mbstring": "*"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Escaper\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs",
"homepage": "https://laminas.dev",
"keywords": [
"escaper",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-escaper/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-escaper/issues",
"rss": "https://github.com/laminas/laminas-escaper/releases.atom",
"source": "https://github.com/laminas/laminas-escaper"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-09-02T17:10:53+00:00"
},
{
"name": "laminas/laminas-http",
"version": "2.15.1",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-http.git",
"reference": "261f079c3dffcf6f123484db43c40e44c4bf1c79"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-http/zipball/261f079c3dffcf6f123484db43c40e44c4bf1c79",
"reference": "261f079c3dffcf6f123484db43c40e44c4bf1c79",
"shasum": ""
},
"require": {
"laminas/laminas-loader": "^2.8",
"laminas/laminas-stdlib": "^3.6",
"laminas/laminas-uri": "^2.9.1",
"laminas/laminas-validator": "^2.15",
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"zendframework/zend-http": "*"
},
"require-dev": {
"ext-curl": "*",
"laminas/laminas-coding-standard": "~2.2.1",
"phpunit/phpunit": "^9.5.5"
},
"suggest": {
"paragonie/certainty": "For automated management of cacert.pem"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Http\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests",
"homepage": "https://laminas.dev",
"keywords": [
"http",
"http client",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-http/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-http/issues",
"rss": "https://github.com/laminas/laminas-http/releases.atom",
"source": "https://github.com/laminas/laminas-http"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-12-03T10:17:11+00:00"
},
{
"name": "laminas/laminas-i18n",
"version": "2.13.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-i18n.git",
"reference": "b3a55d05818ed37ed18e76c103727e95e32cf591"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/b3a55d05818ed37ed18e76c103727e95e32cf591",
"reference": "b3a55d05818ed37ed18e76c103727e95e32cf591",
"shasum": ""
},
"require": {
"ext-intl": "*",
"laminas/laminas-stdlib": "^2.7 || ^3.0",
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"phpspec/prophecy": "<1.9.0",
"zendframework/zend-i18n": "*"
},
"require-dev": {
"laminas/laminas-cache": "^3.1.2",
"laminas/laminas-cache-storage-adapter-memory": "^2.0.0",
"laminas/laminas-cache-storage-deprecated-factory": "^1.0.0",
"laminas/laminas-coding-standard": "~1.0.0",
"laminas/laminas-config": "^3.4.0",
"laminas/laminas-eventmanager": "^3.4.0",
"laminas/laminas-filter": "^2.10.0",
"laminas/laminas-servicemanager": "^3.7.0",
"laminas/laminas-validator": "^2.14.0",
"laminas/laminas-view": "^2.12.0",
"phpunit/phpunit": "^9.3"
},
"suggest": {
"laminas/laminas-cache": "You should install this package to cache the translations",
"laminas/laminas-config": "You should install this package to use the INI translation format",
"laminas/laminas-eventmanager": "You should install this package to use the events in the translator",
"laminas/laminas-filter": "You should install this package to use the provided filters",
"laminas/laminas-i18n-resources": "This package provides validator and captcha translations",
"laminas/laminas-servicemanager": "You should install this package to use the translator",
"laminas/laminas-validator": "You should install this package to use the provided validators",
"laminas/laminas-view": "You should install this package to use the provided view helpers"
},
"type": "library",
"extra": {
"laminas": {
"component": "Laminas\\I18n",
"config-provider": "Laminas\\I18n\\ConfigProvider"
}
},
"autoload": {
"psr-4": {
"Laminas\\I18n\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Provide translations for your application, and filter and validate internationalized values",
"homepage": "https://laminas.dev",
"keywords": [
"i18n",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-i18n/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-i18n/issues",
"rss": "https://github.com/laminas/laminas-i18n/releases.atom",
"source": "https://github.com/laminas/laminas-i18n"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-12-06T00:44:40+00:00"
},
{
"name": "laminas/laminas-loader",
"version": "2.8.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-loader.git",
"reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-loader/zipball/d0589ec9dd48365fd95ad10d1c906efd7711c16b",
"reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b",
"shasum": ""
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"zendframework/zend-loader": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.2.1",
"phpunit/phpunit": "^9.3"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Loader\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Autoloading and plugin loading strategies",
"homepage": "https://laminas.dev",
"keywords": [
"laminas",
"loader"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-loader/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-loader/issues",
"rss": "https://github.com/laminas/laminas-loader/releases.atom",
"source": "https://github.com/laminas/laminas-loader"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-09-02T18:30:53+00:00"
},
{
"name": "laminas/laminas-math",
"version": "3.5.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-math.git",
"reference": "146d8187ab247ae152e811a6704a953d43537381"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-math/zipball/146d8187ab247ae152e811a6704a953d43537381",
"reference": "146d8187ab247ae152e811a6704a953d43537381",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"zendframework/zend-math": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
"phpunit/phpunit": "^9.5.5"
},
"suggest": {
"ext-bcmath": "If using the bcmath functionality",
"ext-gmp": "If using the gmp functionality"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2.x-dev",
"dev-develop": "3.3.x-dev"
}
},
"autoload": {
"psr-4": {
"Laminas\\Math\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Create cryptographically secure pseudo-random numbers, and manage big integers",
"homepage": "https://laminas.dev",
"keywords": [
"laminas",
"math"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-math/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-math/issues",
"rss": "https://github.com/laminas/laminas-math/releases.atom",
"source": "https://github.com/laminas/laminas-math"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-12-06T02:02:07+00:00"
},
{
"name": "laminas/laminas-stdlib",
"version": "3.10.1",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-stdlib.git",
"reference": "0d669074845fc80a99add0f64025192f143ef836"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/0d669074845fc80a99add0f64025192f143ef836",
"reference": "0d669074845fc80a99add0f64025192f143ef836",
"shasum": ""
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"zendframework/zend-stdlib": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.3.0",
"phpbench/phpbench": "^1.0",
"phpunit/phpunit": "^9.3.7",
"psalm/plugin-phpunit": "^0.16.0",
"vimeo/psalm": "^4.7"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Stdlib\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "SPL extensions, array utilities, error handlers, and more",
"homepage": "https://laminas.dev",
"keywords": [
"laminas",
"stdlib"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-stdlib/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-stdlib/issues",
"rss": "https://github.com/laminas/laminas-stdlib/releases.atom",
"source": "https://github.com/laminas/laminas-stdlib"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-06-10T14:49:09+00:00"
},
{
"name": "laminas/laminas-uri",
"version": "2.9.1",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-uri.git",
"reference": "7e837dc15c8fd3949df7d1213246fd7c8640032b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-uri/zipball/7e837dc15c8fd3949df7d1213246fd7c8640032b",
"reference": "7e837dc15c8fd3949df7d1213246fd7c8640032b",
"shasum": ""
},
"require": {
"laminas/laminas-escaper": "^2.9",
"laminas/laminas-validator": "^2.15",
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"zendframework/zend-uri": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.2.1",
"phpunit/phpunit": "^9.5.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Laminas\\Uri\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)",
"homepage": "https://laminas.dev",
"keywords": [
"laminas",
"uri"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-uri/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-uri/issues",
"rss": "https://github.com/laminas/laminas-uri/releases.atom",
"source": "https://github.com/laminas/laminas-uri"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-09-09T18:37:15+00:00"
},
{
"name": "laminas/laminas-validator",
"version": "2.19.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-validator.git",
"reference": "4875d4e58b6f728981bb767a60530540f82ee1df"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-validator/zipball/4875d4e58b6f728981bb767a60530540f82ee1df",
"reference": "4875d4e58b6f728981bb767a60530540f82ee1df",
"shasum": ""
},
"require": {
"container-interop/container-interop": "^1.1",
"laminas/laminas-stdlib": "^3.10",
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"zendframework/zend-validator": "*"
},
"require-dev": {
"laminas/laminas-cache": "^2.6.1",
"laminas/laminas-coding-standard": "~2.2.1",
"laminas/laminas-db": "^2.7",
"laminas/laminas-filter": "^2.6",
"laminas/laminas-http": "^2.14.2",
"laminas/laminas-i18n": "^2.6",
"laminas/laminas-math": "^2.6",
"laminas/laminas-servicemanager": "^2.7.11 || ^3.0.3",
"laminas/laminas-session": "^2.8",
"laminas/laminas-uri": "^2.7",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.5.5",
"psalm/plugin-phpunit": "^0.15.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0",
"vimeo/psalm": "^4.3"
},
"suggest": {
"laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator",
"laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator",
"laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages",
"laminas/laminas-i18n-resources": "Translations of validator messages",
"laminas/laminas-math": "Laminas\\Math component, required by the Csrf validator",
"laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains",
"laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator",
"laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators",
"psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators"
},
"type": "library",
"extra": {
"laminas": {
"component": "Laminas\\Validator",
"config-provider": "Laminas\\Validator\\ConfigProvider"
}
},
"autoload": {
"psr-4": {
"Laminas\\Validator\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria",
"homepage": "https://laminas.dev",
"keywords": [
"laminas",
"validator"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-validator/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-validator/issues",
"rss": "https://github.com/laminas/laminas-validator/releases.atom",
"source": "https://github.com/laminas/laminas-validator"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2022-06-09T21:49:40+00:00"
},
{
"name": "psr/container",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
"shasum": ""
},
"require": {
"php": ">=7.2.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
"homepage": "https://github.com/php-fig/container",
"keywords": [
"PSR-11",
"container",
"container-interface",
"container-interop",
"psr"
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.1"
},
"time": "2021-03-05T17:36:06+00:00"
}
],
"packages-dev": [
{
"name": "doctrine/instantiator",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9",
"ext-pdo": "*",
"ext-phar": "*",
"phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.22"
},
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
"homepage": "https://ocramius.github.io/"
}
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
"homepage": "https://www.doctrine-project.org/projects/instantiator.html",
"keywords": [
"constructor",
"instantiate"
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.4.1"
},
"funding": [
{
"url": "https://www.doctrine-project.org/sponsorship.html",
"type": "custom"
},
{
"url": "https://www.patreon.com/phpdoctrine",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
"type": "tidelift"
}
],
"time": "2022-03-03T08:28:38+00:00"
},
{
"name": "laminas/laminas-coding-standard",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-coding-standard.git",
"reference": "08880ce2fbfe62d471cd3cb766a91da630b32539"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/08880ce2fbfe62d471cd3cb766a91da630b32539",
"reference": "08880ce2fbfe62d471cd3cb766a91da630b32539",
"shasum": ""
},
"require": {
"laminas/laminas-zendframework-bridge": "^1.0",
"squizlabs/php_codesniffer": "^2.7"
},
"replace": {
"zendframework/zend-coding-standard": "self.version"
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Laminas coding standard",
"homepage": "https://laminas.dev",
"keywords": [
"Coding Standard",
"laminas"
],
"support": {
"chat": "https://laminas.dev/chat",
"docs": "https://docs.laminas.dev/laminas-coding-standard/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-coding-standard/issues",
"rss": "https://github.com/laminas/laminas-coding-standard/releases.atom",
"source": "https://github.com/laminas/laminas-coding-standard"
},
"time": "2019-12-31T16:28:26+00:00"
},
{
"name": "laminas/laminas-zendframework-bridge",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
"reference": "88bf037259869891afce6504cacc4f8a07b24d0f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/88bf037259869891afce6504cacc4f8a07b24d0f",
"reference": "88bf037259869891afce6504cacc4f8a07b24d0f",
"shasum": ""
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"psalm/plugin-phpunit": "^0.15.1",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.6"
},
"type": "library",
"extra": {
"laminas": {
"module": "Laminas\\ZendFrameworkBridge"
}
},
"autoload": {
"files": [
"src/autoload.php"
],
"psr-4": {
"Laminas\\ZendFrameworkBridge\\": "src//"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Alias legacy ZF class names to Laminas Project equivalents.",
"keywords": [
"ZendFramework",
"autoloading",
"laminas",
"zf"
],
"support": {
"forum": "https://discourse.laminas.dev/",
"issues": "https://github.com/laminas/laminas-zendframework-bridge/issues",
"rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom",
"source": "https://github.com/laminas/laminas-zendframework-bridge"
},
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-12-21T14:34:37+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
"reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"conflict": {
"doctrine/collections": "<1.6.8",
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
},
"require-dev": {
"doctrine/collections": "^1.6.8",
"doctrine/common": "^2.13.3 || ^3.2.2",
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
"autoload": {
"files": [
"src/DeepCopy/deep_copy.php"
],
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
"keywords": [
"clone",
"copy",
"duplicate",
"object",
"object graph"
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
"type": "tidelift"
}
],
"time": "2022-03-03T13:19:32+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.14.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1",
"reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=7.0"
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
},
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.9-dev"
}
},
"autoload": {
"psr-4": {
"PhpParser\\": "lib/PhpParser"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Nikita Popov"
}
],
"description": "A PHP parser written in PHP",
"keywords": [
"parser",
"php"
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0"
},
"time": "2022-05-31T20:59:12+00:00"
},
{
"name": "phar-io/manifest",
"version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
"reference": "97803eca37d319dfa7826cc2437fc020857acb53"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
"reference": "97803eca37d319dfa7826cc2437fc020857acb53",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-phar": "*",
"ext-xmlwriter": "*",
"phar-io/version": "^3.0.1",
"php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
},
{
"name": "Sebastian Heuer",
"email": "sebastian@phpeople.de",
"role": "Developer"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "Developer"
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": {
"issues": "https://github.com/phar-io/manifest/issues",
"source": "https://github.com/phar-io/manifest/tree/2.0.3"
},
"time": "2021-07-20T11:28:43+00:00"
},
{
"name": "phar-io/version",
"version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
},
{
"name": "Sebastian Heuer",
"email": "sebastian@phpeople.de",
"role": "Developer"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "Developer"
}
],
"description": "Library for handling version information and constraints",
"support": {
"issues": "https://github.com/phar-io/version/issues",
"source": "https://github.com/phar-io/version/tree/3.2.1"
},
"time": "2022-02-21T01:04:05+00:00"
},
{
"name": "phpdocumentor/reflection-common",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-2.x": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jaap van Otterdijk",
"email": "opensource@ijaap.nl"
}
],
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
"homepage": "http://www.phpdoc.org",
"keywords": [
"FQSEN",
"phpDocumentor",
"phpdoc",
"reflection",
"static analysis"
],
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
"source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
},
"time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"shasum": ""
},
"require": {
"ext-filter": "*",
"php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.2",
"phpdocumentor/type-resolver": "^1.3",
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"mockery/mockery": "~1.3.2",
"psalm/phar": "^4.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
},
{
"name": "Jaap van Otterdijk",
"email": "account@ijaap.nl"
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
},
"time": "2021-10-19T17:43:47+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "77a32518733312af16a44300404e945338981de3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
"reference": "77a32518733312af16a44300404e945338981de3",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"ext-tokenizer": "*",
"psalm/phar": "^4.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-1.x": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
},
"time": "2022-03-15T21:29:03+00:00"
},
{
"name": "phpspec/prophecy",
"version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.2",
"php": "^7.2 || ~8.0, <8.2",
"phpdocumentor/reflection-docblock": "^5.2",
"sebastian/comparator": "^3.0 || ^4.0",
"sebastian/recursion-context": "^3.0 || ^4.0"
},
"require-dev": {
"phpspec/phpspec": "^6.0 || ^7.0",
"phpunit/phpunit": "^8.0 || ^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Prophecy\\": "src/Prophecy"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Konstantin Kudryashov",
"email": "ever.zet@gmail.com",
"homepage": "http://everzet.com"
},
{
"name": "Marcello Duarte",
"email": "marcello.duarte@gmail.com"
}
],
"description": "Highly opinionated mocking framework for PHP 5.3+",
"homepage": "https://github.com/phpspec/prophecy",
"keywords": [
"Double",
"Dummy",
"fake",
"mock",
"spy",
"stub"
],
"support": {
"issues": "https://github.com/phpspec/prophecy/issues",
"source": "https://github.com/phpspec/prophecy/tree/v1.15.0"
},
"time": "2021-12-08T12:19:24+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.15",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
"reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.13.0",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
"sebastian/code-unit-reverse-lookup": "^2.0.2",
"sebastian/complexity": "^2.0",
"sebastian/environment": "^5.1.2",
"sebastian/lines-of-code": "^1.0.3",
"sebastian/version": "^3.0.1",
"theseer/tokenizer": "^1.2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-pcov": "*",
"ext-xdebug": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.2-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [
"coverage",
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-03-07T09:28:20+00:00"
},
{
"name": "phpunit/php-file-iterator",
"version": "3.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
"reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
"keywords": [
"filesystem",
"iterator"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2021-12-02T12:48:52+00:00"
},
{
"name": "phpunit/php-invoker",
"version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
"reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"ext-pcntl": "*",
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-pcntl": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Invoke callables with a timeout",
"homepage": "https://github.com/sebastianbergmann/php-invoker/",
"keywords": [
"process"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-invoker/issues",
"source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T05:58:55+00:00"
},
{
"name": "phpunit/php-text-template",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
"reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
"reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Simple template engine.",
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
"template"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
"source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T05:33:50+00:00"
},
{
"name": "phpunit/php-timer",
"version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
"reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Utility class for timing",
"homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
"timer"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-timer/issues",
"source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:16:10+00:00"
},
{
"name": "phpunit/phpunit",
"version": "9.5.21",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1",
"reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.3.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.10.1",
"phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpspec/prophecy": "^1.12.1",
"phpunit/php-code-coverage": "^9.2.13",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
"phpunit/php-timer": "^5.0.2",
"sebastian/cli-parser": "^1.0.1",
"sebastian/code-unit": "^1.0.6",
"sebastian/comparator": "^4.0.5",
"sebastian/diff": "^4.0.3",
"sebastian/environment": "^5.1.3",
"sebastian/exporter": "^4.0.3",
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
"sebastian/type": "^3.0",
"sebastian/version": "^3.0.2"
},
"require-dev": {
"phpspec/prophecy-phpunit": "^2.0.1"
},
"suggest": {
"ext-soap": "*",
"ext-xdebug": "*"
},
"bin": [
"phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.5-dev"
}
},
"autoload": {
"files": [
"src/Framework/Assert/Functions.php"
],
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "The PHP Unit Testing framework.",
"homepage": "https://phpunit.de/",
"keywords": [
"phpunit",
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21"
},
"funding": [
{
"url": "https://phpunit.de/sponsors.html",
"type": "custom"
},
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-06-19T12:14:25+00:00"
},
{
"name": "sebastian/cli-parser",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
"reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library for parsing CLI options",
"homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues",
"source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T06:08:49+00:00"
},
{
"name": "sebastian/code-unit",
"version": "1.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
"reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
"reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Collection of value objects that represent the PHP code units",
"homepage": "https://github.com/sebastianbergmann/code-unit",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit/issues",
"source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:08:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
"version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
"reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
"source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T05:30:19+00:00"
},
{
"name": "sebastian/comparator",
"version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "55f4261989e546dc112258c7a75935a81a7ce382"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382",
"reference": "55f4261989e546dc112258c7a75935a81a7ce382",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/diff": "^4.0",
"sebastian/exporter": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
}
],
"description": "Provides the functionality to compare PHP values for equality",
"homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
"source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T15:49:45+00:00"
},
{
"name": "sebastian/complexity",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
"reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
"reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.7",
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library for calculating the complexity of PHP code units",
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
"source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T15:52:27+00:00"
},
{
"name": "sebastian/diff",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"symfony/process": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
}
],
"description": "Diff implementation",
"homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
"diff",
"udiff",
"unidiff",
"unified diff"
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
"source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:10:38+00:00"
},
{
"name": "sebastian/environment",
"version": "5.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-posix": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.1-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Provides functionality to handle HHVM/PHP environments",
"homepage": "http://www.github.com/sebastianbergmann/environment",
"keywords": [
"Xdebug",
"environment",
"hhvm"
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-04-03T09:37:03+00:00"
},
{
"name": "sebastian/exporter",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9",
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
"homepage": "https://www.github.com/sebastianbergmann/exporter",
"keywords": [
"export",
"exporter"
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2021-11-11T14:18:36+00:00"
},
{
"name": "sebastian/global-state",
"version": "5.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/object-reflector": "^2.0",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-dom": "*",
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-uopz": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Snapshotting of global state",
"homepage": "http://www.github.com/sebastianbergmann/global-state",
"keywords": [
"global state"
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-02-14T08:28:10+00:00"
},
{
"name": "sebastian/lines-of-code",
"version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
"reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.6",
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library for counting the lines of code in PHP source code",
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-28T06:42:11+00:00"
},
{
"name": "sebastian/object-enumerator",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
"reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
"reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/object-reflector": "^2.0",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
"source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:12:34+00:00"
},
{
"name": "sebastian/object-reflector",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
"reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
"reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-reflector/issues",
"source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:14:26+00:00"
},
{
"name": "sebastian/recursion-context",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "cd9d8cf3c5804de4341c283ed787f099f5506172"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172",
"reference": "cd9d8cf3c5804de4341c283ed787f099f5506172",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
}
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
"source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:17:30+00:00"
},
{
"name": "sebastian/resource-operations",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
"reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"support": {
"issues": "https://github.com/sebastianbergmann/resource-operations/issues",
"source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T06:45:17+00:00"
},
{
"name": "sebastian/type",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad",
"reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Collection of value objects that represent the types of the PHP type system",
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
"source": "https://github.com/sebastianbergmann/type/tree/3.0.0"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2022-03-15T09:54:48+00:00"
},
{
"name": "sebastian/version",
"version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
"reference": "c6c1022351a901512170118436c764e473f6de8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
"reference": "c6c1022351a901512170118436c764e473f6de8c",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"support": {
"issues": "https://github.com/sebastianbergmann/version/issues",
"source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T06:39:44+00:00"
},
{
"name": "squizlabs/php_codesniffer",
"version": "2.9.2",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "2acf168de78487db620ab4bc524135a13cfe6745"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745",
"reference": "2acf168de78487db620ab4bc524135a13cfe6745",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=5.1.2"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"bin": [
"scripts/phpcs",
"scripts/phpcbf"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"autoload": {
"classmap": [
"CodeSniffer.php",
"CodeSniffer/CLI.php",
"CodeSniffer/Exception.php",
"CodeSniffer/File.php",
"CodeSniffer/Fixer.php",
"CodeSniffer/Report.php",
"CodeSniffer/Reporting.php",
"CodeSniffer/Sniff.php",
"CodeSniffer/Tokens.php",
"CodeSniffer/Reports/",
"CodeSniffer/Tokenizers/",
"CodeSniffer/DocGenerators/",
"CodeSniffer/Standards/AbstractPatternSniff.php",
"CodeSniffer/Standards/AbstractScopeSniff.php",
"CodeSniffer/Standards/AbstractVariableSniff.php",
"CodeSniffer/Standards/IncorrectPatternException.php",
"CodeSniffer/Standards/Generic/Sniffs/",
"CodeSniffer/Standards/MySource/Sniffs/",
"CodeSniffer/Standards/PEAR/Sniffs/",
"CodeSniffer/Standards/PSR1/Sniffs/",
"CodeSniffer/Standards/PSR2/Sniffs/",
"CodeSniffer/Standards/Squiz/Sniffs/",
"CodeSniffer/Standards/Zend/Sniffs/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Greg Sherwood",
"role": "lead"
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "http://www.squizlabs.com/php-codesniffer",
"keywords": [
"phpcs",
"standards"
],
"support": {
"issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
"time": "2018-11-07T22:31:41+00:00"
},
{
"name": "theseer/tokenizer",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/1.2.1"
},
"funding": [
{
"url": "https://github.com/theseer",
"type": "github"
}
],
"time": "2021-07-28T10:34:58+00:00"
},
{
"name": "webmozart/assert",
"version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
"reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
"reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"php": "^7.2 || ^8.0"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<4.6.1 || 4.6.2"
},
"require-dev": {
"phpunit/phpunit": "^8.5.13"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.10-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Assertions to validate method input/output with nice error messages.",
"keywords": [
"assert",
"check",
"validate"
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/1.11.0"
},
"time": "2022-06-03T18:03:27+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"
}
PK nuTԅWl l README.mdnu ٘ # laminas-oauth
> ## 🇷🇺 Русским гражданам
>
> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
>
> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
>
> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
>
> ## 🇺🇸 To Citizens of Russia
>
> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
>
> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
>
> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"
> This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only).
> If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/).
> If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)
>
> If you are looking for an actively maintained package alternative, we recommend:
>
> - [league/oauth1-client](https://github.com/thephpleague/oauth1-client)
[![Build Status](https://github.com/laminas/laminas-oauth/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-oauth/actions?query=workflow%3A"Continuous+Integration")
laminas-oauth provides the ability to authenticate via OAuth1 providers.
- File issues at https://github.com/laminas/laminas-oauth/issues
PK nuT{?m
.gitignorenu ٘ /.phpunit.result.cache
/vendor/
PK nuT src/Consumer.phpnu ٘ config = new Config\StandardConfig;
if ($options !== null) {
if ($options instanceof Traversable) {
$options = ArrayUtils::iteratorToArray($options);
}
$this->config->setOptions($options);
}
}
/**
* Attempts to retrieve a Request Token from an OAuth Provider which is
* later exchanged for an authorized Access Token used to access the
* protected resources exposed by a web service API.
*
* @param null|array $customServiceParameters Non-OAuth Provider-specified parameters
* @param null|string $httpMethod
* @param null|Laminas\OAuth\Http\RequestToken $request
* @return Laminas\OAuth\Token\Request
*/
public function getRequestToken(
array $customServiceParameters = null,
$httpMethod = null,
Http\RequestToken $request = null
) {
if ($request === null) {
$request = new Http\RequestToken($this, $customServiceParameters);
} elseif ($customServiceParameters !== null) {
$request->setParameters($customServiceParameters);
}
if ($httpMethod !== null) {
$request->setMethod($httpMethod);
} else {
$request->setMethod($this->getRequestMethod());
}
$this->requestToken = $request->execute();
return $this->requestToken;
}
/**
* After a Request Token is retrieved, the user may be redirected to the
* OAuth Provider to authorize the application's access to their
* protected resources - the redirect URL being provided by this method.
* Once the user has authorized the application for access, they are
* redirected back to the application which can now exchange the previous
* Request Token for a fully authorized Access Token.
*
* @param null|array $customServiceParameters
* @param null|Laminas\OAuth\Token\Request $token
* @param null|Laminas\OAuth\HTTP\UserAuthorization $redirect
* @return string
*/
public function getRedirectUrl(
array $customServiceParameters = null,
Token\Request $token = null,
Http\UserAuthorization $redirect = null
) {
if ($redirect === null) {
$redirect = new Http\UserAuthorization($this, $customServiceParameters);
} elseif ($customServiceParameters !== null) {
$redirect->setParameters($customServiceParameters);
}
if ($token !== null) {
$this->requestToken = $token;
}
return $redirect->getUrl();
}
/**
* Rather than retrieve a redirect URL for use, e.g. from a controller,
* one may perform an immediate redirect.
*
* Sends headers and exit()s on completion.
*
* @param null|array $customServiceParameters
* @param null|Laminas\OAuth\Http\UserAuthorization $request
* @return void
*/
public function redirect(
array $customServiceParameters = null,
Http\UserAuthorization $request = null
) {
$redirectUrl = $this->getRedirectUrl($customServiceParameters, $request);
header('Location: ' . $redirectUrl);
exit(1);
}
/**
* Retrieve an Access Token in exchange for a previously received/authorized
* Request Token.
*
* @param array $queryData GET data returned in user's redirect from Provider
* @param \Laminas\OAuth\Token\Request Request Token information
* @param string $httpMethod
* @param \Laminas\OAuth\Http\AccessToken $request
* @return \Laminas\OAuth\Token\Access
* @throws Exception\InvalidArgumentException on invalid authorization
* token, non-matching response authorization token, or unprovided
* authorization token
*/
public function getAccessToken(
$queryData,
Token\Request $token,
$httpMethod = null,
Http\AccessToken $request = null
) {
$authorizedToken = new Token\AuthorizedRequest($queryData);
if (! $authorizedToken->isValid()) {
throw new Exception\InvalidArgumentException(
'Response from Service Provider is not a valid authorized request token'
);
}
if ($request === null) {
$request = new Http\AccessToken($this);
}
// OAuth 1.0a Verifier
if ($authorizedToken->getParam('oauth_verifier') !== null) {
$params = array_merge($request->getParameters(), [
'oauth_verifier' => $authorizedToken->getParam('oauth_verifier')
]);
$request->setParameters($params);
}
if ($httpMethod !== null) {
$request->setMethod($httpMethod);
} else {
$request->setMethod($this->getRequestMethod());
}
if (isset($token)) {
if ($authorizedToken->getToken() !== $token->getToken()) {
throw new Exception\InvalidArgumentException(
'Authorized token from Service Provider does not match'
. ' supplied Request Token details'
);
}
} else {
throw new Exception\InvalidArgumentException('Request token must be passed to method');
}
$this->requestToken = $token;
$this->accessToken = $request->execute();
return $this->accessToken;
}
/**
* Return whatever the last Request Token retrieved was while using the
* current Consumer instance.
*
* @return \Laminas\OAuth\Token\Request
*/
public function getLastRequestToken()
{
return $this->requestToken;
}
/**
* Return whatever the last Access Token retrieved was while using the
* current Consumer instance.
*
* @return \Laminas\OAuth\Token\Access
*/
public function getLastAccessToken()
{
return $this->accessToken;
}
/**
* Alias to self::getLastAccessToken()
*
* @return \Laminas\OAuth\Token\Access
*/
public function getToken()
{
return $this->accessToken;
}
/**
* Simple Proxy to the current Laminas_OAuth_Config method. It's that instance
* which holds all configuration methods and values this object also presents
* as it's API.
*
* @param string $method
* @param array $args
* @return mixed
* @throws Exception\BadMethodCallException if method does not exist in config object
*/
public function __call($method, array $args)
{
if (! method_exists($this->config, $method)) {
throw new Exception\BadMethodCallException('Method does not exist: '.$method);
}
return call_user_func_array([$this->config, $method], $args);
}
}
PK nuT/% " src/Exception/RuntimeException.phpnu ٘ getRequest();
$headers = $request->getHeaders();
if ($headers->has('Authorization')) {
$auth = $headers->get('Authorization');
$headers->removeHeader($auth);
}
self::$httpClient->resetParameters();
}
return self::$httpClient;
}
/**
* Simple mechanism to delete the entire singleton HTTP Client instance
* which forces an new instantiation for subsequent requests.
*
* @return void
*/
public static function clearHttpClient()
{
self::$httpClient = null;
}
}
PK nuTD" " src/Client.phpnu ٘ oauthConfig = new Config\StandardConfig();
if ($oauthOptions !== null) {
if ($oauthOptions instanceof Traversable) {
$oauthOptions = ArrayUtils::iteratorToArray($oauthOptions);
}
$this->oauthConfig->setOptions($oauthOptions);
}
}
/**
* Set the streamingRequest variable which controls whether we are
* sending the raw (already encoded) POST data from a stream source.
*
* @param boolean $value The value to set.
* @return void
*/
public function setStreamingRequest($value)
{
$this->streamingRequest = $value;
}
/**
* Check whether the client is set to perform streaming requests.
*
* @return boolean True if yes, false otherwise.
*/
public function getStreamingRequest()
{
if ($this->streamingRequest) {
return true;
}
return false;
}
/**
* Prepare the request body (for POST and PUT requests)
*
* @return string
* @throws \Laminas\Http\Client\Exception\RuntimeException
*/
protected function prepareBody()
{
if ($this->streamingRequest) {
$this->setHeaders(['Content-Length' =>
$this->raw_post_data->getTotalSize()]);
return $this->raw_post_data;
}
return parent::prepareBody();
}
/**
* Clear all custom parameters we set.
*
* @return HttpClient
*/
public function resetParameters($clearAll = false)
{
$this->streamingRequest = false;
return parent::resetParameters($clearAll);
}
/**
* Set the raw (already encoded) POST data from a stream source.
*
* This is used to support POSTing from open file handles without
* caching the entire body into memory. It is a wrapper around
* Laminas\Http\Client::setRawBody().
*
* @param string $data The request data
* @param string $enctype The encoding type
* @return HttpClient
*/
public function setRawDataStream($data, $enctype = null)
{
$this->streamingRequest = true;
$this->setEncType($enctype);
return $this->setRawBody($data);
}
/**
* Same as Laminas_HTTP_Client::setMethod() except it also creates an
* OAuth specific reference to the method type.
* Might be defunct and removed in a later iteration.
*
* @param string $method
* @return HttpClient
*/
public function setMethod($method = HttpRequest::METHOD_GET)
{
if ($method == HttpRequest::METHOD_GET) {
$this->setRequestMethod(HttpRequest::METHOD_GET);
} elseif ($method == HttpRequest::METHOD_POST) {
$this->setRequestMethod(HttpRequest::METHOD_POST);
} elseif ($method == HttpRequest::METHOD_PUT) {
$this->setRequestMethod(HttpRequest::METHOD_PUT);
} elseif ($method == HttpRequest::METHOD_DELETE) {
$this->setRequestMethod(HttpRequest::METHOD_DELETE);
} elseif ($method == HttpRequest::METHOD_HEAD) {
$this->setRequestMethod(HttpRequest::METHOD_HEAD);
}
return parent::setMethod($method);
}
/**
* Same as Laminas\HTTP\Client::send() except just before the request is
* executed, we automatically append any necessary OAuth parameters and
* sign the request using the relevant signature method.
*
* @param null|Laminas\Http\Request $method
* @return HttpResponse
*/
public function send(HttpRequest $request = null)
{
$this->prepareOAuth();
return parent::send($request);
}
/**
* Performs OAuth preparation on the request before sending.
*
* This primarily means taking a request, correctly encoding and signing
* all parameters, and applying the correct OAuth scheme to the method
* being used.
*
* @return void
* @throws \Laminas\OAuth\Exception\RuntimeException If POSTBODY scheme
* requested, but GET request method used; or if invalid request scheme
* provided
*/
public function prepareOAuth()
{
$requestScheme = $this->getRequestScheme();
switch ($requestScheme) {
case OAuth::REQUEST_SCHEME_HEADER:
$oauthHeaderValue = $this->getToken()->toHeader(
$this->getRequest()->getUriString(),
$this->oauthConfig,
$this->getSignableParameters()
);
$requestHeaders = $this->getRequest()->getHeaders();
$requestHeaders->addHeaders(['Authorization' => $oauthHeaderValue]);
break;
case OAuth::REQUEST_SCHEME_POSTBODY:
if ($this->getRequestMethod() == HttpRequest::METHOD_GET) {
throw new Exception\RuntimeException(
'The client is configured to'
. ' pass OAuth parameters through a POST body but request method'
. ' is set to GET'
);
}
$query = $this->getToken()->toQueryString(
$this->getRequest()->getUriString(),
$this->oauthConfig,
$this->getSignableParameters()
);
$this->setRawBody($query);
break;
case OAuth::REQUEST_SCHEME_QUERYSTRING:
$query = $this->getToken()->toQueryString(
$this->getRequest()->getUriString(),
$this->oauthConfig,
$this->getSignableParameters()
);
$this->getUri()->setQuery($query);
break;
default:
throw new Exception\RuntimeException('Invalid request scheme: ' . $requestScheme);
}
}
/**
* Collect all signable parameters into a single array across query string
* and POST body.
*
* @return array
*/
protected function getSignableParameters()
{
$params = [];
if ($this->getRequest()->getQuery()->count() > 0) {
$params = array_merge($params, $this->getRequest()->getQuery()->toArray());
}
if ($this->getRequest()->getPost()->count() > 0) {
$params = array_merge($params, $this->getRequest()->getPost()->toArray());
}
return $params;
}
/**
* Simple Proxy to the current Laminas_OAuth_Config method. It's that instance
* which holds all configuration methods and values this object also presents
* as it's API.
*
* @param string $method
* @param array $args
* @return mixed
* @throws Exception\BadMethodCallException if method does not exist in config object
*/
public function __call($method, array $args)
{
if (! method_exists($this->oauthConfig, $method)) {
throw new Exception\BadMethodCallException('Method does not exist: ' . $method);
}
return call_user_func_array([$this->oauthConfig, $method], $args);
}
}
PK nuT^ src/Http/UserAuthorization.phpnu ٘ assembleParams();
$uri = Uri\UriFactory::factory($this->consumer->getUserAuthorizationUrl());
$uri->setQuery(
$this->httpUtility->toEncodedQueryString($params)
);
return $uri->toString();
}
/**
* Assemble all parameters for inclusion in a redirect URL.
*
* @return array
*/
public function assembleParams()
{
$params = [
'oauth_token' => $this->consumer->getLastRequestToken()->getToken(),
];
if (! \Laminas\OAuth\Client::$supportsRevisionA) {
$callback = $this->consumer->getCallbackUrl();
if (! empty($callback)) {
$params['oauth_callback'] = $callback;
}
}
if (! empty($this->parameters)) {
$params = array_merge($params, $this->parameters);
}
return $params;
}
}
PK nuT8# # src/Http/RequestToken.phpnu ٘ assembleParams();
$response = $this->startRequestCycle($params);
$return = new Token\Request($response);
return $return;
}
/**
* Assemble all parameters for an OAuth Request Token request.
*
* @return array
*/
public function assembleParams()
{
$params = [
'oauth_consumer_key' => $this->consumer->getConsumerKey(),
'oauth_nonce' => $this->httpUtility->generateNonce(),
'oauth_timestamp' => $this->httpUtility->generateTimestamp(),
'oauth_signature_method' => $this->consumer->getSignatureMethod(),
'oauth_version' => $this->consumer->getVersion(),
];
// indicates we support 1.0a
if ($this->consumer->getCallbackUrl()) {
$params['oauth_callback'] = $this->consumer->getCallbackUrl();
} else {
$params['oauth_callback'] = 'oob';
}
if (! empty($this->parameters)) {
$params = array_merge($params, $this->parameters);
}
$params['oauth_signature'] = $this->httpUtility->sign(
$params,
$this->consumer->getSignatureMethod(),
$this->consumer->getConsumerSecret(),
null,
$this->preferredRequestMethod,
$this->consumer->getRequestTokenUrl()
);
return $params;
}
/**
* Generate and return a HTTP Client configured for the Header Request Scheme
* specified by OAuth, for use in requesting a Request Token.
*
* @param array $params
* @return Http\Client
*/
public function getRequestSchemeHeaderClient(array $params)
{
$headerValue = $this->httpUtility->toAuthorizationHeader(
$params
);
$client = OAuth::getHttpClient();
$client->setUri($this->consumer->getRequestTokenUrl());
$request = $client->getRequest();
$request->getHeaders()
->addHeaderLine('Authorization', $headerValue);
$rawdata = $this->httpUtility->toEncodedQueryString($params, true);
if (! empty($rawdata)) {
$request->setContent($rawdata);
}
$client->setMethod($this->preferredRequestMethod);
return $client;
}
/**
* Generate and return a HTTP Client configured for the POST Body Request
* Scheme specified by OAuth, for use in requesting a Request Token.
*
* @param array $params
* @return Http\Client
*/
public function getRequestSchemePostBodyClient(array $params)
{
$client = OAuth::getHttpClient();
$client->setUri($this->consumer->getRequestTokenUrl());
$client->setMethod($this->preferredRequestMethod);
$request = $client->getRequest();
$request->setContent(
$this->httpUtility->toEncodedQueryString($params)
);
$request->getHeaders()
->addHeaderLine('Content-Type', Http\Client::ENC_URLENCODED);
return $client;
}
}
PK nuT src/Http/AccessToken.phpnu ٘ assembleParams();
$response = $this->startRequestCycle($params);
$return = new Token\Access($response);
return $return;
}
/**
* Assemble all parameters for an OAuth Access Token request.
*
* @return array
*/
public function assembleParams()
{
$params = [
'oauth_consumer_key' => $this->consumer->getConsumerKey(),
'oauth_nonce' => $this->httpUtility->generateNonce(),
'oauth_signature_method' => $this->consumer->getSignatureMethod(),
'oauth_timestamp' => $this->httpUtility->generateTimestamp(),
'oauth_token' => $this->consumer->getLastRequestToken()->getToken(),
'oauth_version' => $this->consumer->getVersion(),
];
if (! empty($this->parameters)) {
$params = array_merge($params, $this->parameters);
}
$params['oauth_signature'] = $this->httpUtility->sign(
$params,
$this->consumer->getSignatureMethod(),
$this->consumer->getConsumerSecret(),
$this->consumer->getLastRequestToken()->getTokenSecret(),
$this->preferredRequestMethod,
$this->consumer->getAccessTokenUrl()
);
return $params;
}
/**
* Generate and return a HTTP Client configured for the Header Request Scheme
* specified by OAuth, for use in requesting an Access Token.
*
* @param array $params
* @return Laminas\Http\Client
*/
public function getRequestSchemeHeaderClient(array $params)
{
$params = $this->cleanParamsOfIllegalCustomParameters($params);
$headerValue = $this->toAuthorizationHeader($params);
$client = OAuth::getHttpClient();
$client->setUri($this->consumer->getAccessTokenUrl());
$client->setHeaders(['Authorization' => $headerValue]);
$client->setMethod($this->preferredRequestMethod);
return $client;
}
/**
* Generate and return a HTTP Client configured for the POST Body Request
* Scheme specified by OAuth, for use in requesting an Access Token.
*
* @param array $params
* @return Laminas\Http\Client
*/
public function getRequestSchemePostBodyClient(array $params)
{
$params = $this->cleanParamsOfIllegalCustomParameters($params);
$client = OAuth::getHttpClient();
$client->setUri($this->consumer->getAccessTokenUrl());
$client->setMethod($this->preferredRequestMethod);
$client->setRawBody(
$this->httpUtility->toEncodedQueryString($params)
);
$client->setHeaders(['Content-Type' => Http\Client::ENC_URLENCODED]);
return $client;
}
/**
* Generate and return a HTTP Client configured for the Query String Request
* Scheme specified by OAuth, for use in requesting an Access Token.
*
* @param array $params
* @param string $url
* @return Laminas\Http\Client
*/
public function getRequestSchemeQueryStringClient(array $params, $url)
{
$params = $this->cleanParamsOfIllegalCustomParameters($params);
return parent::getRequestSchemeQueryStringClient($params, $url);
}
/**
* Access Token requests specifically may not contain non-OAuth parameters.
* So these should be striped out and excluded. Detection is easy since
* specified OAuth parameters start with "oauth_", Extension params start
* with "xouth_", and no other parameters should use these prefixes.
*
* xouth params are not currently allowable.
*
* @param array $params
* @return array
*/
protected function cleanParamsOfIllegalCustomParameters(array $params)
{
foreach ($params as $key => $value) {
if (! preg_match("/^oauth_/", $key)) {
unset($params[$key]);
}
}
return $params;
}
}
PK nuTJ8 8 src/Http/Utility.phpnu ٘ $config->getConsumerKey(),
'oauth_nonce' => $this->generateNonce(),
'oauth_signature_method' => $config->getSignatureMethod(),
'oauth_timestamp' => $this->generateTimestamp(),
'oauth_version' => $config->getVersion(),
];
if ($config->getToken()->getToken() != null) {
$params['oauth_token'] = $config->getToken()->getToken();
}
if ($serviceProviderParams !== null) {
$params = array_merge($params, $serviceProviderParams);
}
$params['oauth_signature'] = $this->sign(
$params,
$config->getSignatureMethod(),
$config->getConsumerSecret(),
$config->getToken()->getTokenSecret(),
$config->getRequestMethod(),
$url
);
return $params;
}
/**
* Given both OAuth parameters and any custom parameters, generate an
* encoded query string. This method expects parameters to have been
* assembled and signed beforehand.
*
* @param array $params
* @param bool $customParamsOnly Ignores OAuth params e.g. for requests using OAuth Header
* @return string
*/
public function toEncodedQueryString(array $params, $customParamsOnly = false)
{
if ($customParamsOnly) {
foreach ($params as $key => $value) {
if (preg_match("/^oauth_/", $key)) {
unset($params[$key]);
}
}
}
$encodedParams = [];
foreach ($params as $key => $value) {
$encodedParams[] = self::urlEncode($key)
. '='
. self::urlEncode($value);
}
return implode('&', $encodedParams);
}
/**
* Cast to authorization header
*
* @param array $params
* @param null|string $realm
* @param bool $excludeCustomParams
* @return void
*/
public function toAuthorizationHeader(array $params, $realm = null, $excludeCustomParams = true)
{
$headerValue = [
'OAuth realm="' . $realm . '"',
];
foreach ($params as $key => $value) {
if ($excludeCustomParams) {
if (! preg_match("/^oauth_/", $key)) {
continue;
}
}
$headerValue[] = self::urlEncode($key)
. '="'
. self::urlEncode($value) . '"';
}
return implode(",", $headerValue);
}
/**
* Sign request
*
* @param array $params
* @param string $signatureMethod
* @param string $consumerSecret
* @param null|string $tokenSecret
* @param null|string $method
* @param null|string $url
* @return string
*/
public function sign(
array $params,
$signatureMethod,
$consumerSecret,
$tokenSecret = null,
$method = null,
$url = null
) {
$className = '';
$hashAlgo = null;
$parts = explode('-', (string) $signatureMethod);
if (count($parts) > 1) {
$className = 'Laminas\OAuth\Signature\\' . ucfirst(strtolower($parts[0]));
$hashAlgo = $parts[1];
} else {
$className = 'Laminas\OAuth\Signature\\' . ucfirst(strtolower($signatureMethod));
}
$signatureObject = new $className($consumerSecret, $tokenSecret, $hashAlgo);
return $signatureObject->sign($params, $method, $url);
}
/**
* Parse query string
*
* @param mixed $query
* @return array
*/
public function parseQueryString($query)
{
$params = [];
if (empty($query)) {
return [];
}
// Not remotely perfect but beats parse_str() which converts
// periods and uses urldecode, not rawurldecode.
$parts = explode('&', $query);
foreach ($parts as $pair) {
$kv = explode('=', $pair);
$params[rawurldecode($kv[0])] = rawurldecode($kv[1]);
}
return $params;
}
/**
* Generate nonce
*
* @return string
*/
public function generateNonce()
{
return md5(uniqid(rand(), true));
}
/**
* Generate timestamp
*
* @return int
*/
public function generateTimestamp()
{
return time();
}
/**
* urlencode a value
*
* @param string $value
* @return string
*/
public static function urlEncode($value)
{
$encoded = rawurlencode((string) $value);
$encoded = str_replace('%7E', '~', $encoded);
return $encoded;
}
}
PK nuTm4zg g src/Http.phpnu ٘ consumer = $consumer;
$this->preferredRequestScheme = $this->consumer->getRequestScheme();
if ($parameters !== null) {
$this->setParameters($parameters);
}
if ($utility !== null) {
$this->httpUtility = $utility;
} else {
$this->httpUtility = new Http\Utility;
}
}
/**
* Set a preferred HTTP request method.
*
* @param string $method
* @return Http
* @throws Exception\InvalidArgumentException
*/
public function setMethod($method)
{
if (! in_array($method, [OAuth::POST, OAuth::GET])) {
throw new Exception\InvalidArgumentException('invalid HTTP method: ' . $method);
}
$this->preferredRequestMethod = $method;
return $this;
}
/**
* Preferred HTTP request method accessor.
*
* @return string
*/
public function getMethod()
{
return $this->preferredRequestMethod;
}
/**
* Mutator to set an array of custom parameters for the HTTP request.
*
* @param array $customServiceParameters
* @return Http
*/
public function setParameters(array $customServiceParameters)
{
$this->parameters = $customServiceParameters;
return $this;
}
/**
* Accessor for an array of custom parameters.
*
* @return array
*/
public function getParameters()
{
return $this->parameters;
}
/**
* Return the Consumer instance in use.
*
* @return Consumer
*/
public function getConsumer()
{
return $this->consumer;
}
/**
* Commence a request cycle where the current HTTP method and OAuth
* request scheme set an upper preferred HTTP request style and where
* failures generate a new HTTP request style further down the OAuth
* preference list for OAuth Request Schemes.
* On success, return the Request object that results for processing.
*
* @todo Remove cycling?; Replace with upfront do-or-die configuration
* @param array $params
* @return \Laminas\Http\Response
* @throws Exception\InvalidArgumentException on HTTP request errors
*/
public function startRequestCycle(array $params)
{
$response = null;
$body = null;
$status = null;
try {
$response = $this->attemptRequest($params);
} catch (\Laminas\Http\Client\Exception\ExceptionInterface $e) {
throw new Exception\InvalidArgumentException(sprintf(
'Error in HTTP request: %s',
$e->getMessage()
), null, $e);
}
if ($response !== null) {
$body = $response->getBody();
$status = $response->getStatusCode();
}
if ($response === null // Request failure/exception
|| $status == 500 // Internal Server Error
|| $status == 400 // Bad Request
|| $status == 401 // Unauthorized
|| empty($body) // Missing token
) {
$this->assessRequestAttempt($response);
$response = $this->startRequestCycle($params);
}
return $response;
}
/**
* Return an instance of Laminas_Http_Client configured to use the Query
* String scheme for an OAuth driven HTTP request.
*
* @param array $params
* @param string $url
* @return \Laminas\Http\Client
*/
public function getRequestSchemeQueryStringClient(array $params, $url)
{
$client = OAuth::getHttpClient();
$client->setUri($url);
$client->getUri()->setQuery(
$this->httpUtility->toEncodedQueryString($params)
);
$client->setMethod($this->preferredRequestMethod);
return $client;
}
/**
* Manages the switch from OAuth request scheme to another lower preference
* scheme during a request cycle.
*
* @param Laminas\Http\Response
* @return void
* @throws Exception\RuntimeException if unable to retrieve valid token response
*/
protected function assessRequestAttempt(\Laminas\Http\Response $response = null)
{
switch ($this->preferredRequestScheme) {
case OAuth::REQUEST_SCHEME_HEADER:
$this->preferredRequestScheme = OAuth::REQUEST_SCHEME_POSTBODY;
break;
case OAuth::REQUEST_SCHEME_POSTBODY:
$this->preferredRequestScheme = OAuth::REQUEST_SCHEME_QUERYSTRING;
break;
default:
throw new Exception\RuntimeException(
'Could not retrieve a valid Token response from Token URL:'
. ($response !== null
? PHP_EOL . $response->getBody()
: ' No body - check for headers')
);
}
}
/**
* Generates a valid OAuth Authorization header based on the provided
* parameters and realm.
*
* @param array $params
* @param string $realm
* @return string
*/
protected function toAuthorizationHeader(array $params, $realm = null)
{
$headerValue = [];
$headerValue[] = 'OAuth realm="' . $realm . '"';
foreach ($params as $key => $value) {
if (! preg_match("/^oauth_/", $key)) {
continue;
}
$headerValue[] = Http\Utility::urlEncode($key)
. '="'
. Http\Utility::urlEncode($value)
. '"';
}
return implode(",", $headerValue);
}
/**
* Attempt a request based on the current configured OAuth Request Scheme and
* return the resulting HTTP Response.
*
* @param array $params
* @return \Laminas\Http\Response
*/
protected function attemptRequest(array $params)
{
switch ($this->preferredRequestScheme) {
case OAuth::REQUEST_SCHEME_HEADER:
$httpClient = $this->getRequestSchemeHeaderClient($params);
break;
case OAuth::REQUEST_SCHEME_POSTBODY:
$httpClient = $this->getRequestSchemePostBodyClient($params);
break;
case OAuth::REQUEST_SCHEME_QUERYSTRING:
$httpClient = $this->getRequestSchemeQueryStringClient(
$params,
$this->consumer->getRequestTokenUrl()
);
break;
}
return $httpClient->send();
}
}
PK nuT{M src/Config/ConfigInterface.phpnu ٘ setOptions($options);
}
}
/**
* Parse option array and setup options using their
* relevant mutators.
*
* @param array $options
* @return StandardConfig
*/
public function setOptions(array $options)
{
foreach ($options as $key => $value) {
switch ($key) {
case 'consumerKey':
$this->setConsumerKey($value);
break;
case 'consumerSecret':
$this->setConsumerSecret($value);
break;
case 'token':
$this->setToken($value);
break;
case 'signatureMethod':
$this->setSignatureMethod($value);
break;
case 'version':
$this->setVersion($value);
break;
case 'callbackUrl':
$this->setCallbackUrl($value);
break;
case 'siteUrl':
$this->setSiteUrl($value);
break;
case 'requestTokenUrl':
$this->setRequestTokenUrl($value);
break;
case 'accessTokenUrl':
$this->setAccessTokenUrl($value);
break;
case 'userAuthorizationUrl':
$this->setUserAuthorizationUrl($value);
break;
case 'authorizeUrl':
$this->setAuthorizeUrl($value);
break;
case 'requestMethod':
$this->setRequestMethod($value);
break;
case 'requestScheme':
$this->setRequestScheme($value);
break;
case 'rsaPrivateKey':
$this->setRsaPrivateKey($value);
break;
case 'rsaPublicKey':
$this->setRsaPublicKey($value);
break;
}
}
if (isset($options['requestScheme'])) {
$this->setRequestScheme($options['requestScheme']);
}
return $this;
}
/**
* Set consumer key
*
* @param string $key
* @return StandardConfig
*/
public function setConsumerKey($key)
{
$this->consumerKey = $key;
return $this;
}
/**
* Get consumer key
*
* @return string
*/
public function getConsumerKey()
{
return $this->consumerKey;
}
/**
* Set consumer secret
*
* @param string $secret
* @return StandardConfig
*/
public function setConsumerSecret($secret)
{
$this->consumerSecret = $secret;
return $this;
}
/**
* Get consumer secret
*
* Returns RSA private key if set; otherwise, returns any previously set
* consumer secret.
*
* @return string
*/
public function getConsumerSecret()
{
if ($this->rsaPrivateKey !== null) {
return $this->rsaPrivateKey;
}
return $this->consumerSecret;
}
/**
* Set signature method
*
* @param string $method
* @return StandardConfig
* @throws Exception\InvalidArgumentException if unsupported signature method specified
*/
public function setSignatureMethod($method)
{
$method = strtoupper($method);
if (! in_array($method, [
'HMAC-SHA1', 'HMAC-SHA256', 'RSA-SHA1', 'PLAINTEXT'
])
) {
throw new Exception\InvalidArgumentException('Unsupported signature method: '
. $method
. '. Supported are HMAC-SHA1, RSA-SHA1, PLAINTEXT and HMAC-SHA256');
}
$this->signatureMethod = $method;
return $this;
}
/**
* Get signature method
*
* @return string
*/
public function getSignatureMethod()
{
return $this->signatureMethod;
}
/**
* Set request scheme
*
* @param string $scheme
* @return StandardConfig
* @throws Exception\InvalidArgumentException if invalid scheme specified,
* or if POSTBODY set when request method of GET is specified
*/
public function setRequestScheme($scheme)
{
$scheme = strtolower($scheme);
if (! in_array($scheme, [
OAuth::REQUEST_SCHEME_HEADER,
OAuth::REQUEST_SCHEME_POSTBODY,
OAuth::REQUEST_SCHEME_QUERYSTRING,
])
) {
throw new Exception\InvalidArgumentException(
'\'' . $scheme . '\' is an unsupported request scheme'
);
}
if ($scheme == OAuth::REQUEST_SCHEME_POSTBODY
&& $this->getRequestMethod() == OAuth::GET
) {
throw new Exception\InvalidArgumentException(
'Cannot set POSTBODY request method if HTTP method set to GET'
);
}
$this->requestScheme = $scheme;
return $this;
}
/**
* Get request scheme
*
* @return string
*/
public function getRequestScheme()
{
return $this->requestScheme;
}
/**
* Set version
*
* @param string $version
* @return StandardConfig
*/
public function setVersion($version)
{
$this->version = $version;
return $this;
}
/**
* Get version
*
* @return string
*/
public function getVersion()
{
return $this->version;
}
/**
* Set callback URL
*
* @param string $url Valid URI or Out-Of-Band constant 'oob'
* @return StandardConfig
* @throws Exception\InvalidArgumentException for invalid URLs
*/
public function setCallbackUrl($url)
{
if ($url !== 'oob') {
$this->validateUrl($url);
}
$this->callbackUrl = $url;
return $this;
}
/**
* Get callback URL
*
* @return string
*/
public function getCallbackUrl()
{
return $this->callbackUrl;
}
/**
* Set site URL
*
* @param string $url
* @return StandardConfig
* @throws Exception\InvalidArgumentException for invalid URLs
*/
public function setSiteUrl($url)
{
$this->validateUrl($url);
$this->siteUrl = $url;
return $this;
}
/**
* Get site URL
*
* @return string
*/
public function getSiteUrl()
{
return $this->siteUrl;
}
/**
* Set request token URL
*
* @param string $url
* @return StandardConfig
* @throws Exception\InvalidArgumentException for invalid URLs
*/
public function setRequestTokenUrl($url)
{
$this->validateUrl($url);
$this->requestTokenUrl = rtrim($url, '/');
return $this;
}
/**
* Get request token URL
*
* If no request token URL has been set, but a site URL has, returns the
* site URL with the string "/request_token" appended.
*
* @return string
*/
public function getRequestTokenUrl()
{
if (! $this->requestTokenUrl && $this->siteUrl) {
return rtrim($this->siteUrl, '/') . '/request_token';
}
return $this->requestTokenUrl;
}
/**
* Set access token URL
*
* @param string $url
* @return StandardConfig
* @throws Exception\InvalidArgumentException for invalid URLs
*/
public function setAccessTokenUrl($url)
{
$this->validateUrl($url);
$this->accessTokenUrl = rtrim($url, '/');
return $this;
}
/**
* Get access token URL
*
* If no access token URL has been set, but a site URL has, returns the
* site URL with the string "/access_token" appended.
*
* @return string
*/
public function getAccessTokenUrl()
{
if (! $this->accessTokenUrl && $this->siteUrl) {
return rtrim($this->siteUrl, '/') . '/access_token';
}
return $this->accessTokenUrl;
}
/**
* Set user authorization URL
*
* @param string $url
* @return StandardConfig
* @throws Exception\InvalidArgumentException for invalid URLs
*/
public function setUserAuthorizationUrl($url)
{
return $this->setAuthorizeUrl($url);
}
/**
* Set authorization URL
*
* @param string $url
* @return StandardConfig
* @throws Exception\InvalidArgumentException for invalid URLs
*/
public function setAuthorizeUrl($url)
{
$this->validateUrl($url);
$this->authorizeUrl = rtrim($url, '/');
return $this;
}
/**
* Get user authorization URL
*
* @return string
*/
public function getUserAuthorizationUrl()
{
return $this->getAuthorizeUrl();
}
/**
* Get authorization URL
*
* If no authorization URL has been set, but a site URL has, returns the
* site URL with the string "/authorize" appended.
*
* @return string
*/
public function getAuthorizeUrl()
{
if (! $this->authorizeUrl && $this->siteUrl) {
return rtrim($this->siteUrl, '/') . '/authorize';
}
return $this->authorizeUrl;
}
/**
* Set request method
*
* @param string $method
* @return StandardConfig
* @throws Exception\InvalidArgumentException for invalid request methods
*/
public function setRequestMethod($method)
{
$method = strtoupper($method);
if (! in_array($method, [
OAuth::GET,
OAuth::POST,
OAuth::PUT,
OAuth::DELETE,
])
) {
throw new Exception\InvalidArgumentException('Invalid method: ' . $method);
}
$this->requestMethod = $method;
return $this;
}
/**
* Get request method
*
* @return string
*/
public function getRequestMethod()
{
return $this->requestMethod;
}
/**
* Set RSA public key
*
* @param \Laminas\Crypt\PublicKey\Rsa\PublicKey $key
* @return StandardConfig
*/
public function setRsaPublicKey(\Laminas\Crypt\PublicKey\Rsa\PublicKey $key)
{
$this->rsaPublicKey = $key;
return $this;
}
/**
* Get RSA public key
*
* @return \Laminas\Crypt\PublicKey\Rsa\PublicKey
*/
public function getRsaPublicKey()
{
return $this->rsaPublicKey;
}
/**
* Set RSA private key
*
* @param \Laminas\Crypt\PublicKey\Rsa\PrivateKey $key
* @return StandardConfig
*/
public function setRsaPrivateKey(\Laminas\Crypt\PublicKey\Rsa\PrivateKey $key)
{
$this->rsaPrivateKey = $key;
return $this;
}
/**
* Get RSA private key
*
* @return \Laminas\Crypt\PublicKey\Rsa\PrivateKey
*/
public function getRsaPrivateKey()
{
return $this->rsaPrivateKey;
}
/**
* Set OAuth token
*
* @param TokenInterface $token
* @return StandardConfig
*/
public function setToken(TokenInterface $token)
{
$this->token = $token;
return $this;
}
/**
* Get OAuth token
*
* @return TokenInterface
*/
public function getToken()
{
return $this->token;
}
/**
* Determine if a given URL is valid
*
* @param string $url
* @return void
* @throws Exception\InvalidArgumentException
*/
protected function validateUrl($url)
{
$uri = Uri\UriFactory::factory($url);
if (! $uri->isValid()) {
throw new Exception\InvalidArgumentException(sprintf("'%s' is not a valid URI", $url));
} elseif (! in_array($uri->getScheme(), ['http', 'https'])) {
throw new Exception\InvalidArgumentException(sprintf("'%s' is not a valid URI", $url));
}
}
}
PK nuT%,v v src/Token/AuthorizedRequest.phpnu ٘ data = $data;
$params = $this->parseData();
if (count($params) > 0) {
$this->setParams($params);
}
}
if ($utility !== null) {
$this->httpUtility = $utility;
} else {
$this->httpUtility = new Http\Utility;
}
}
/**
* Retrieve token data
*
* @return array
*/
public function getData()
{
return $this->data;
}
/**
* Indicate if token is valid
*
* @return bool
*/
public function isValid()
{
if (isset($this->params[self::TOKEN_PARAM_KEY])
&& ! empty($this->params[self::TOKEN_PARAM_KEY])
) {
return true;
}
return false;
}
/**
* Parse string data into array
*
* @return array
*/
protected function parseData()
{
$params = [];
if (empty($this->data)) {
return;
}
foreach ($this->data as $key => $value) {
$params[rawurldecode($key)] = rawurldecode($value);
}
return $params;
}
}
PK nuTH
src/Token/AbstractToken.phpnu ٘ response = $response;
$params = $this->parseParameters($response);
if (count($params) > 0) {
$this->setParams($params);
}
}
if ($utility !== null) {
$this->httpUtility = $utility;
} else {
$this->httpUtility = new HTTPUtility;
}
}
/**
* Attempts to validate the Token parsed from the HTTP response - really
* it's just very basic existence checks which are minimal.
*
* @return bool
*/
public function isValid()
{
if (isset($this->params[self::TOKEN_PARAM_KEY])
&& ! empty($this->params[self::TOKEN_PARAM_KEY])
&& isset($this->params[self::TOKEN_SECRET_PARAM_KEY])
) {
return true;
}
return false;
}
/**
* Return the HTTP response object used to initialise this instance.
*
* @return \Laminas\Http\Response
*/
public function getResponse()
{
return $this->response;
}
/**
* Sets the value for the this Token's secret which may be used when signing
* requests with this Token.
*
* @param string $secret
* @return \Laminas\OAuth\Token\AbstractToken
*/
public function setTokenSecret($secret)
{
$this->setParam(self::TOKEN_SECRET_PARAM_KEY, $secret);
return $this;
}
/**
* Retrieve this Token's secret which may be used when signing
* requests with this Token.
*
* @return string
*/
public function getTokenSecret()
{
return $this->getParam(self::TOKEN_SECRET_PARAM_KEY);
}
/**
* Sets the value for a parameter (e.g. token secret or other) and run
* a simple filter to remove any trailing newlines.
*
* @param string $key
* @param string $value
* @return \Laminas\OAuth\Token\AbstractToken
*/
public function setParam($key, $value)
{
$this->params[$key] = trim($value, "\n");
return $this;
}
/**
* Sets the value for some parameters (e.g. token secret or other) and run
* a simple filter to remove any trailing newlines.
*
* @param array $params
* @return \Laminas\OAuth\Token\AbstractToken
*/
public function setParams(array $params)
{
foreach ($params as $key => $value) {
$this->setParam($key, $value);
}
return $this;
}
/**
* Get the value for a parameter (e.g. token secret or other).
*
* @param string $key
* @return mixed
*/
public function getParam($key)
{
if (isset($this->params[$key])) {
return $this->params[$key];
}
return null;
}
/**
* Sets the value for a Token.
*
* @param string $token
* @return \Laminas\OAuth\Token\AbstractToken
*/
public function setToken($token)
{
$this->setParam(self::TOKEN_PARAM_KEY, $token);
return $this;
}
/**
* Gets the value for a Token.
*
* @return string
*/
public function getToken()
{
return $this->getParam(self::TOKEN_PARAM_KEY);
}
/**
* Generic accessor to enable access as public properties.
*
* @return string
*/
public function __get($key)
{
return $this->getParam($key);
}
/**
* Generic mutator to enable access as public properties.
*
* @param string $key
* @param string $value
* @return void
*/
public function __set($key, $value)
{
$this->setParam($key, $value);
}
/**
* Convert Token to a string, specifically a raw encoded query string.
*
* @return string
*/
public function toString()
{
return $this->httpUtility->toEncodedQueryString($this->params);
}
/**
* Convert Token to a string, specifically a raw encoded query string.
* Aliases to self::toString()
*
* @return string
*/
public function __toString()
{
return $this->toString();
}
/**
* Parse a HTTP response body and collect returned parameters
* as raw url decoded key-value pairs in an associative array.
*
* @param \Laminas\Http\Response $response
* @return array
*/
protected function parseParameters(HTTPResponse $response)
{
$params = [];
$body = $response->getBody();
if (empty($body)) {
return [];
}
// validate body based on acceptable characters...todo
$parts = explode('&', $body);
foreach ($parts as $kvpair) {
$pair = explode('=', $kvpair);
$params[rawurldecode($pair[0])] = rawurldecode($pair[1]);
}
return $params;
}
/**
* Limit serialisation stored data to the parameters
*/
public function __sleep()
{
return ['_params'];
}
/**
* After serialisation, re-instantiate a HTTP utility class for use
*/
public function __wakeup()
{
if ($this->httpUtility === null) {
$this->httpUtility = new HTTPUtility;
}
}
}
PK nuTd@ src/Token/Request.phpnu ٘ _params[AbstractToken::TOKEN_PARAM_CALLBACK_CONFIRMED])) {
Client::$supportsRevisionA = true;
}
}
}
PK nuT˥n n src/Token/Access.phpnu ٘ isValid()
|| ! in_array($uri->getScheme(), ['http', 'https'])
) {
throw new Exception\InvalidArgumentException(
'\'' . $url . '\' is not a valid URI'
);
}
$params = $this->httpUtility->assembleParams($url, $config, $customParams);
return $this->httpUtility->toAuthorizationHeader($params, $realm);
}
/**
* Cast to HTTP query string
*
* @param mixed $url
* @param Laminas\OAuth\Config $config
* @param null|array $params
* @return string
* @throws Exception\InvalidArgumentException
*/
public function toQueryString($url, Config $config, array $params = null)
{
$uri = Uri\UriFactory::factory($url);
if (! $uri->isValid()
|| ! in_array($uri->getScheme(), ['http', 'https'])
) {
throw new Exception\InvalidArgumentException(
'\'' . $url . '\' is not a valid URI'
);
}
$params = $this->httpUtility->assembleParams($url, $config, $params);
return $this->httpUtility->toEncodedQueryString($params);
}
/**
* Get OAuth client
*
* @param array $oauthOptions
* @param null|string $uri
* @param null|array|\Traversable $config
* @param bool $excludeCustomParamsFromHeader
* @return Client
*/
public function getHttpClient(
array $oauthOptions,
$uri = null,
$config = null,
$excludeCustomParamsFromHeader = true
) {
$client = new Client($oauthOptions, $uri, $config, $excludeCustomParamsFromHeader);
$client->setToken($this);
return $client;
}
}
PK nuT`* * src/Token/TokenInterface.phpnu ٘ tokenSecret === null) {
return $this->consumerSecret . '&';
}
$return = implode('&', [$this->consumerSecret, $this->tokenSecret]);
return $return;
}
}
PK nuTZ1@ @ $ src/Signature/SignatureInterface.phpnu ٘ key,
$this->hashAlgorithm,
$this->getBaseSignatureString($params, $method, $url),
HMACEncryption::OUTPUT_BINARY
);
return base64_encode($binaryHash);
}
}
PK nuTYW W # src/Signature/AbstractSignature.phpnu ٘ consumerSecret = $consumerSecret;
if (isset($tokenSecret)) {
$this->tokenSecret = $tokenSecret;
}
$this->key = $this->assembleKey();
if (isset($hashAlgo)) {
$this->hashAlgorithm = $hashAlgo;
}
}
/**
* Normalize the base signature URL
*
* @param string $url
* @return string
* @throws Exception\InvalidArgumentException
*/
public function normaliseBaseSignatureUrl($url)
{
$uri = Uri\UriFactory::factory($url);
$uri->normalize();
if ($uri->getScheme() == 'http' && $uri->getPort() == '80') {
$uri->setPort('');
} elseif ($uri->getScheme() == 'https' && $uri->getPort() == '443') {
$uri->setPort('');
} elseif (! in_array($uri->getScheme(), ['http', 'https'])) {
throw new Exception\InvalidArgumentException('Invalid URL provided; must be an HTTP or HTTPS scheme');
}
$uri->setQuery('');
$uri->setFragment('');
return $uri->toString();
}
/**
* Assemble key from consumer and token secrets
*
* @return string
*/
protected function assembleKey()
{
$parts = [$this->consumerSecret];
if ($this->tokenSecret !== null) {
$parts[] = $this->tokenSecret;
}
foreach ($parts as $key => $secret) {
$parts[$key] = HTTPUtility::urlEncode($secret);
}
return implode('&', $parts);
}
/**
* Get base signature string
*
* @param array $params
* @param null|string $method
* @param null|string $url
* @return string
*/
protected function getBaseSignatureString(array $params, $method = null, $url = null)
{
$encodedParams = [];
foreach ($params as $key => $value) {
$encodedParams[HTTPUtility::urlEncode($key)] =
HTTPUtility::urlEncode($value);
}
$baseStrings = [];
if (isset($method)) {
$baseStrings[] = strtoupper($method);
}
if (isset($url)) {
// should normalise later
$baseStrings[] = HTTPUtility::urlEncode(
$this->normaliseBaseSignatureUrl($url)
);
}
if (isset($encodedParams['oauth_signature'])) {
unset($encodedParams['oauth_signature']);
}
$baseStrings[] = HTTPUtility::urlEncode(
$this->toByteValueOrderedQueryString($encodedParams)
);
return implode('&', $baseStrings);
}
/**
* Transform an array to a byte value ordered query string
*
* @param array $params
* @return string
*/
protected function toByteValueOrderedQueryString(array $params)
{
$return = [];
uksort($params, 'strnatcmp');
foreach ($params as $key => $value) {
if (is_array($value)) {
natsort($value);
foreach ($value as $keyduplicate) {
$return[] = $key . '=' . $keyduplicate;
}
} else {
$return[] = $key . '=' . $value;
}
}
return implode('&', $return);
}
}
PK nuTB, src/Signature/Rsa.phpnu ٘ $this->hashAlgorithm,
'binary_output' => true
]));
return $rsa->sign($this->getBaseSignatureString($params, $method, $url), $this->key);
}
/**
* Assemble encryption key
*
* @return string
*/
protected function assembleKey()
{
return $this->consumerSecret;
}
}
PK nuT= phpcs.xml.distnu ٘
src
test
PK nuT_/6 6 .github/workflows/auto-close.ymlnu ٘ name: Autocloser
on: [issues, pull_request]
jobs:
autoclose:
runs-on: ubuntu-latest
steps:
- name: Autoclose new issues and PRs
uses: roots/issue-closer@v1.1
with:
repo-token: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
issue-pattern: "^exact-string-will-never-match$"
pr-pattern: "^exact-string-will-never-match$"
issue-close-message: |
This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only).
If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/).
If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)
If you are looking for an actively maintained package alternative, we recommend:
- [league/oauth1-client](https://github.com/thephpleague/oauth1-client)
pr-close-message: |
This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only).
If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/).
If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)
If you are looking for an actively maintained package alternative, we recommend:
- [league/oauth1-client](https://github.com/thephpleague/oauth1-client)
PK nuT`S , .github/workflows/continuous-integration.ymlnu ٘ name: "Continuous Integration"
on:
pull_request:
push:
branches:
- '[0-9]+.[0-9]+.x'
- 'refs/pull/*'
tags:
jobs:
matrix:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Gather CI configuration
id: matrix
uses: laminas/laminas-ci-matrix-action@v1
qa:
name: QA Checks
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}PK nuTu|e)
1 .github/workflows/release-on-milestone-closed.ymlnu ٘ # Alternate workflow example.
# This one is identical to the one in release-on-milestone.yml, with one change:
# the Release step uses the ORGANIZATION_ADMIN_TOKEN instead, to allow it to
# trigger a release workflow event. This is useful if you have other actions
# that intercept that event.
name: "Automatic Releases"
on:
milestone:
types:
- "closed"
jobs:
release:
name: "GIT tag, release & create merge-up PR"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Release"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:release"
env:
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
- name: "Create Merge-Up Pull Request"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
- name: "Create and/or Switch to new Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
env:
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
- name: "Bump Changelog Version On Originating Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:bump-changelog"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
- name: "Create new milestones"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-milestones"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
PK nuT " test/TestAsset/HTTPClient32874.phpnu ٘ getRequest()->getContent();
}
}
PK nuTum33 3 # test/TestAsset/HTTPUtility90244.phpnu ٘ raw_post_data;}
}
PK nuT% test/TestAsset/Token34879.phpnu ٘ setToken('abcde');
return $token;
}
public function getRequestMethod()
{
return 'POST';
}
}
PK nuTZa ! test/TestAsset/Consumer32874b.phpnu ٘ requestToken = new Request();
$this->accessToken = new Access();
parent::__construct($options);
}
public function getCallbackUrl()
{
return 'http://www.example.com/local';
}
}
PK nuTZ 3 3 # test/TestAsset/HTTPUtility32874.phpnu ٘ stubConsumer = new Consumer32874();
$this->stubConsumer2 = new Consumer32874b();
$this->stubHttpUtility = new HTTPUtility32874();
OAuth::setHttpClient(new HTTPClient32874());
}
public function teardown(): void
{
OAuth::clearHttpClient();
}
public function testConstructorSetsConsumerInstance()
{
$request = new Http\RequestToken($this->stubConsumer, null, $this->stubHttpUtility);
$this->assertInstanceOf(Consumer32874::class, $request->getConsumer());
}
public function testConstructorSetsCustomServiceParameters()
{
$request = new Http\RequestToken($this->stubConsumer, [1,2,3], $this->stubHttpUtility);
$this->assertEquals([1,2,3], $request->getParameters());
}
public function testAssembleParametersCorrectlyAggregatesOauthParameters()
{
$request = new Http\RequestToken($this->stubConsumer, null, $this->stubHttpUtility);
$expectedParams = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_timestamp' => '12345678901',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_version' => '1.0',
'oauth_callback' => 'http://www.example.com/local',
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c'
];
$this->assertEquals($expectedParams, $request->assembleParams());
}
public function testAssembleParametersCorrectlyAggregatesOauthParametersIfCallbackUrlMissing()
{
$request = new Http\RequestToken($this->stubConsumer2, null, $this->stubHttpUtility);
$expectedParams = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_timestamp' => '12345678901',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_version' => '1.0',
'oauth_callback' => 'oob', // out-of-band when missing callback - 1.0a
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c'
];
$this->assertEquals($expectedParams, $request->assembleParams());
}
public function testAssembleParametersCorrectlyAggregatesCustomParameters()
{
$request = new Http\RequestToken($this->stubConsumer, [
'custom_param1' => 'foo',
'custom_param2' => 'bar'
], $this->stubHttpUtility);
$expectedParams = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_timestamp' => '12345678901',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_version' => '1.0',
'oauth_callback' => 'http://www.example.com/local',
'custom_param1' => 'foo',
'custom_param2' => 'bar',
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c'
];
$this->assertEquals($expectedParams, $request->assembleParams());
}
public function testGetRequestSchemeHeaderClientSetsCorrectlyEncodedAuthorizationHeader()
{
$request = new Http\RequestToken($this->stubConsumer, null, $this->stubHttpUtility);
$params = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => '12345678901',
'oauth_version' => '1.0',
'oauth_callback_url' => 'http://www.example.com/local',
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c~',
'custom_param1' => 'foo',
'custom_param2' => 'bar'
];
$client = $request->getRequestSchemeHeaderClient($params);
$this->assertEquals(
'OAuth realm="",oauth_consumer_key="1234567890",oauth_nonce="e807f1fcf82d132f9b'
.'b018ca6738a19f",oauth_signature_method="HMAC-SHA1",oauth_timestamp="'
.'12345678901",oauth_version="1.0",oauth_callback_url='
.'"http%3A%2F%2Fwww.example.com%2Flocal",oauth_signature="6fb42da0e32e07b61c9f0251fe627a9c~"',
$client->getHeader('Authorization')
);
}
public function testGetRequestSchemePostBodyClientSetsCorrectlyEncodedRawData()
{
$request = new Http\RequestToken($this->stubConsumer, null, $this->stubHttpUtility);
$params = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => '12345678901',
'oauth_version' => '1.0',
'oauth_callback_url' => 'http://www.example.com/local',
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c~',
'custom_param1' => 'foo',
'custom_param2' => 'bar'
];
$client = $request->getRequestSchemePostBodyClient($params);
$this->assertEquals(
'oauth_consumer_key=1234567890&oauth_nonce=e807f1fcf82d132f9bb018c'
.'a6738a19f&oauth_signature_method=HMAC-SHA1&oauth_timestamp=12345'
.'678901&oauth_version=1.0&oauth_callback_url=http%3A%2F%2Fwww.example.com%2Flocal'
.'&oauth_signature=6fb42da0e32e07b61c9f0251fe627a9c~'
.'&custom_param1=foo&custom_param2=bar',
$client->getRawData()
);
}
public function testGetRequestSchemeQueryStringClientSetsCorrectlyEncodedQueryString()
{
$request = new Http\RequestToken($this->stubConsumer, null, $this->stubHttpUtility);
$params = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => '12345678901',
'oauth_version' => '1.0',
'oauth_callback_url' => 'http://www.example.com/local',
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c',
'custom_param1' => 'foo',
'custom_param2' => 'bar'
];
$client = $request->getRequestSchemeQueryStringClient($params, 'http://www.example.com');
$this->assertEquals(
'oauth_consumer_key=1234567890&oauth_nonce=e807f1fcf82d132f9bb018c'
.'a6738a19f&oauth_signature_method=HMAC-SHA1&oauth_timestamp=12345'
.'678901&oauth_version=1.0&oauth_callback_url=http%3A%2F%2Fwww.example.com%2Flocal'
.'&oauth_signature=6fb42da0e32e07b61c9f0251fe627a9c'
.'&custom_param1=foo&custom_param2=bar',
$client->getUri()->getQuery()
);
}
}
PK nuTۂ test/Http/AccessTokenTest.phpnu ٘ stubConsumer = new Consumer39745();
$this->stubHttpUtility = new HTTPUtility39745();
OAuth::setHttpClient(new HTTPClient39745());
}
public function teardown(): void
{
OAuth::clearHttpClient();
}
public function testConstructorSetsConsumerInstance()
{
$request = new Http\AccessToken($this->stubConsumer, null, $this->stubHttpUtility);
$this->assertInstanceOf(Consumer39745::class, $request->getConsumer());
}
public function testConstructorSetsCustomServiceParameters()
{
$request = new Http\AccessToken($this->stubConsumer, [1,2,3], $this->stubHttpUtility);
$this->assertEquals([1,2,3], $request->getParameters());
}
public function testAssembleParametersCorrectlyAggregatesOauthParameters()
{
$request = new Http\AccessToken($this->stubConsumer, null, $this->stubHttpUtility);
$expectedParams = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => '12345678901',
'oauth_token' => '0987654321',
'oauth_version' => '1.0',
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c'
];
$this->assertEquals($expectedParams, $request->assembleParams());
}
public function testAssembleParametersCorrectlyIgnoresCustomParameters()
{
$request = new Http\AccessToken($this->stubConsumer, [
'custom_param1' => 'foo',
'custom_param2' => 'bar'
], $this->stubHttpUtility);
$expectedParams = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => '12345678901',
'oauth_token' => '0987654321',
'oauth_version' => '1.0',
'custom_param1' => 'foo',
'custom_param2' => 'bar',
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c'
];
$this->assertEquals($expectedParams, $request->assembleParams());
}
public function testGetRequestSchemeHeaderClientSetsCorrectlyEncodedAuthorizationHeader()
{
$request = new Http\AccessToken($this->stubConsumer, null, $this->stubHttpUtility);
$params = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => '12345678901',
'oauth_token' => '0987654321',
'oauth_version' => '1.0',
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c~',
'custom_param1' => 'foo',
'custom_param2' => 'bar'
];
$client = $request->getRequestSchemeHeaderClient($params);
$this->assertEquals(
'OAuth realm="",oauth_consumer_key="1234567890",oauth_nonce="e807f1fcf82d132f9b'
.'b018ca6738a19f",oauth_signature_method="HMAC-SHA1",oauth_timestamp="'
.'12345678901",oauth_token="0987654321",oauth_version="1.0",oauth_sign'
.'ature="6fb42da0e32e07b61c9f0251fe627a9c~"',
$client->getHeader('Authorization')
);
}
public function testGetRequestSchemePostBodyClientSetsCorrectlyEncodedRawData()
{
$request = new Http\AccessToken($this->stubConsumer, null, $this->stubHttpUtility);
$params = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => '12345678901',
'oauth_token' => '0987654321',
'oauth_version' => '1.0',
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c~',
'custom_param1' => 'foo',
'custom_param2' => 'bar'
];
$client = $request->getRequestSchemePostBodyClient($params);
$this->assertEquals(
'oauth_consumer_key=1234567890&oauth_nonce=e807f1fcf82d132f9bb018c'
.'a6738a19f&oauth_signature_method=HMAC-SHA1&oauth_timestamp=12345'
.'678901&oauth_token=0987654321&oauth_version=1.0&oauth_signature='
.'6fb42da0e32e07b61c9f0251fe627a9c~',
//$client->getRawData()
$client->getRequest()->getContent()
);
}
public function testGetRequestSchemeQueryStringClientSetsCorrectlyEncodedQueryString()
{
$request = new Http\AccessToken($this->stubConsumer, null, $this->stubHttpUtility);
$params = [
'oauth_consumer_key' => '1234567890',
'oauth_nonce' => 'e807f1fcf82d132f9bb018ca6738a19f',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => '12345678901',
'oauth_token' => '0987654321',
'oauth_version' => '1.0',
'oauth_signature' => '6fb42da0e32e07b61c9f0251fe627a9c',
'custom_param1' => 'foo',
'custom_param2' => 'bar'
];
$client = $request->getRequestSchemeQueryStringClient($params, 'http://www.example.com');
$this->assertEquals(
'oauth_consumer_key=1234567890&oauth_nonce=e807f1fcf82d132f9bb018c'
.'a6738a19f&oauth_signature_method=HMAC-SHA1&oauth_timestamp=12345'
.'678901&oauth_token=0987654321&oauth_version=1.0&oauth_signature='
.'6fb42da0e32e07b61c9f0251fe627a9c',
$client->getUri()->getQuery()
);
}
}
PK nuT@7Q Q # test/Http/UserAuthorizationTest.phpnu ٘ stubConsumer = new Consumer34879();
}
public function testConstructorSetsConsumerInstance()
{
$redirect = new Http\UserAuthorization($this->stubConsumer);
$this->assertInstanceOf(Consumer34879::class, $redirect->getConsumer());
}
public function testConstructorSetsCustomServiceParameters()
{
$redirect = new Http\UserAuthorization($this->stubConsumer, [1,2,3]);
$this->assertEquals([1,2,3], $redirect->getParameters());
}
public function testAssembleParametersReturnsUserAuthorizationParamArray()
{
$redirect = new Http\UserAuthorization($this->stubConsumer, ['foo ' => 'bar~']);
$expected = [
'oauth_token' => '1234567890',
'oauth_callback' => 'http://www.example.com/local',
'foo ' => 'bar~'
];
$this->assertEquals($expected, $redirect->assembleParams());
}
public function testGetUrlReturnsEncodedQueryStringParamsAppendedToLocalUrl()
{
$redirect = new Http\UserAuthorization($this->stubConsumer, ['foo ' => 'bar~']);
// @codingStandardsIgnoreLine
$expected = 'http://www.example.com/authorize?oauth_token=1234567890&oauth_callback=http%3A%2F%2Fwww.example.com%2Flocal&foo%20=bar~';
$this->assertEquals($expected, $redirect->getUrl());
}
}
PK nuTo
] test/Http/UtilityTest.phpnu ٘ assertEquals('abcABC123', Http\Utility::urlEncode($string));
}
public function testUrlEncodeCorrectlyEncodesUnreserved()
{
$string = '-._~';
$this->assertEquals('-._~', Http\Utility::urlEncode($string));
}
public function testUrlEncodeCorrectlyEncodesPercentSign()
{
$string = '%';
$this->assertEquals('%25', Http\Utility::urlEncode($string));
}
public function testUrlEncodeCorrectlyEncodesPlusSign()
{
$string = '+';
$this->assertEquals('%2B', Http\Utility::urlEncode($string));
}
public function testUrlEncodeCorrectlyEncodesAmpEqualsAndAsterix()
{
$string = '&=*';
$this->assertEquals('%26%3D%2A', Http\Utility::urlEncode($string));
}
public function testUrlEncodeCorrectlyEncodesSpace()
{
$string = ' ';
$this->assertEquals('%20', Http\Utility::urlEncode($string));
}
public function testUrlEncodeCorrectlyEncodesLineFeed()
{
$string = "\n";
$this->assertEquals('%0A', Http\Utility::urlEncode($string));
}
public function testUrlEncodeCorrectlyEncodesU007F()
{
$string = chr(127);
$this->assertEquals('%7F', Http\Utility::urlEncode($string));
}
public function testUrlEncodeCorrectlyEncodesU0080()
{
$string = "\xC2\x80";
$this->assertEquals('%C2%80', Http\Utility::urlEncode($string));
}
public function testUrlEncodeCorrectlyEncodesU3001()
{
$string = '、';
$this->assertEquals('%E3%80%81', Http\Utility::urlEncode($string));
}
}
PK nuTo test/ConsumerTest.phpnu ٘ '1234567890'];
$consumer = new Consumer($config);
$this->assertEquals('1234567890', $consumer->getConsumerKey());
}
public function testConstructorSetsConsumerSecret()
{
$config = ['consumerSecret' => '0987654321'];
$consumer = new Consumer($config);
$this->assertEquals('0987654321', $consumer->getConsumerSecret());
}
public function testSetsSignatureMethodFromOptionsArray()
{
$options = [
'signatureMethod' => 'rsa-sha1'
];
$consumer = new Consumer($options);
$this->assertEquals('RSA-SHA1', $consumer->getSignatureMethod());
}
public function testSetsRequestMethodFromOptionsArray() // add back
{
$options = [
'requestMethod' => OAuth::GET
];
$consumer = new Consumer($options);
$this->assertEquals(OAuth::GET, $consumer->getRequestMethod());
}
public function testSetsRequestSchemeFromOptionsArray()
{
$options = [
'requestScheme' => OAuth::REQUEST_SCHEME_POSTBODY
];
$consumer = new Consumer($options);
$this->assertEquals(OAuth::REQUEST_SCHEME_POSTBODY, $consumer->getRequestScheme());
}
public function testSetsVersionFromOptionsArray()
{
$options = [
'version' => '1.1'
];
$consumer = new Consumer($options);
$this->assertEquals('1.1', $consumer->getVersion());
}
public function testSetsCallbackUrlFromOptionsArray()
{
$options = [
'callbackUrl' => 'http://www.example.com/local'
];
$consumer = new Consumer($options);
$this->assertEquals('http://www.example.com/local', $consumer->getCallbackUrl());
}
public function testSetsRequestTokenUrlFromOptionsArray()
{
$options = [
'requestTokenUrl' => 'http://www.example.com/request'
];
$consumer = new Consumer($options);
$this->assertEquals('http://www.example.com/request', $consumer->getRequestTokenUrl());
}
public function testSetsUserAuthorizationUrlFromOptionsArray()
{
$options = [
'userAuthorizationUrl' => 'http://www.example.com/authorize'
];
$consumer = new Consumer($options);
$this->assertEquals('http://www.example.com/authorize', $consumer->getUserAuthorizationUrl());
}
public function testSetsAccessTokenUrlFromOptionsArray()
{
$options = [
'accessTokenUrl' => 'http://www.example.com/access'
];
$consumer = new Consumer($options);
$this->assertEquals('http://www.example.com/access', $consumer->getAccessTokenUrl());
}
public function testSetSignatureMethodThrowsExceptionForInvalidMethod()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer($config);
$this->expectException('Laminas\OAuth\Exception\ExceptionInterface');
$consumer->setSignatureMethod('buckyball');
}
public function testSetRequestMethodThrowsExceptionForInvalidMethod()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer($config);
$this->expectException('Laminas\OAuth\Exception\ExceptionInterface');
$consumer->setRequestMethod('buckyball');
}
public function testSetRequestSchemeThrowsExceptionForInvalidMethod()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer($config);
$this->expectException('Laminas\OAuth\Exception\ExceptionInterface');
$consumer->setRequestScheme('buckyball');
}
public function testSetLocalUrlThrowsExceptionForInvalidUrl()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer($config);
$this->expectException('Laminas\OAuth\Exception\ExceptionInterface');
$consumer->setLocalUrl('buckyball');
}
public function testSetRequestTokenUrlThrowsExceptionForInvalidUrl()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer($config);
$this->expectException('Laminas\OAuth\Exception\ExceptionInterface');
$consumer->setRequestTokenUrl('buckyball');
}
public function testSetUserAuthorizationUrlThrowsExceptionForInvalidUrl()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer($config);
$this->expectException('Laminas\OAuth\Exception\ExceptionInterface');
$consumer->setUserAuthorizationUrl('buckyball');
}
public function testSetAccessTokenUrlThrowsExceptionForInvalidUrl()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer($config);
$this->expectException('Laminas\OAuth\Exception\ExceptionInterface');
$consumer->setAccessTokenUrl('buckyball');
}
public function testGetRequestTokenReturnsInstanceOfOauthTokenRequest()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer($config);
$token = $consumer->getRequestToken(null, null, new RequestToken48231());
$this->assertInstanceOf('Laminas\OAuth\Token\Request', $token);
}
public function testGetRedirectUrlReturnsUserAuthorizationUrlWithParameters()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321',
'userAuthorizationUrl' => 'http://www.example.com/authorize'];
$consumer = new Consumer48231($config);
$params = ['foo' => 'bar'];
$uauth = new Http\UserAuthorization($consumer, $params);
$token = new Token\Request;
$token->setParams(['oauth_token' => '123456', 'oauth_token_secret' => '654321']);
$redirectUrl = $consumer->getRedirectUrl($params, $token, $uauth);
$this->assertEquals(
// @codingStandardsIgnoreLine
'http://www.example.com/authorize?oauth_token=123456&oauth_callback=http%3A%2F%2Fwww.example.com%2Flocal&foo=bar',
$redirectUrl
);
}
public function testGetAccessTokenReturnsInstanceOfOauthTokenAccess()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer($config);
$rtoken = new Token\Request;
$rtoken->setToken('token');
$token = $consumer->getAccessToken(['oauth_token' => 'token'], $rtoken, null, new AccessToken48231());
$this->assertInstanceOf('Laminas\OAuth\Token\Access', $token);
}
public function testGetLastRequestTokenReturnsInstanceWhenExists()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer48231($config);
$this->assertInstanceOf('Laminas\OAuth\Token\Request', $consumer->getLastRequestToken());
}
public function testGetLastAccessTokenReturnsInstanceWhenExists()
{
$config = ['consumerKey' => '12345','consumerSecret' => '54321'];
$consumer = new Consumer48231($config);
$this->assertInstanceOf('Laminas\OAuth\Token\Access', $consumer->getLastAccessToken());
}
}
PK nuT% test/OAuthTest.phpnu ٘ assertInstanceOf(HTTPClient19485876::class, OAuth::getHttpClient());
}
public function testGetHttpClientResetsParameters()
{
$client = new HTTPClient19485876();
$client->setParameterGet(['key' => 'value']);
OAuth::setHttpClient($client);
$resetClient = OAuth::getHttpClient();
$resetClient->setUri('http://www.example.com');
$this->assertEquals('http://www.example.com/', (string) $resetClient->getUri(true));
}
public function testGetHttpClientResetsAuthorizationHeader()
{
$client = new HTTPClient19485876();
$client->setHeaders(['Authorization' => 'realm="http://www.example.com",oauth_version="1.0"']);
OAuth::setHttpClient($client);
$resetClient = OAuth::getHttpClient();
$this->assertEquals(null, $resetClient->getHeader('Authorization'));
}
/**
* @group Laminas-10182
*/
public function testOauthClientPassingObjectConfigInConstructor()
{
$options = [
'requestMethod' => 'GET',
'siteUrl' => 'http://www.example.com'
];
$config = new Config($options);
$client = new OAuthClient($config);
$this->assertEquals('GET', $client->getRequestMethod());
$this->assertEquals('http://www.example.com', $client->getSiteUrl());
}
/**
* @group Laminas-10182
*/
public function testOauthClientPassingArrayInConstructor()
{
$options = [
'requestMethod' => 'GET',
'siteUrl' => 'http://www.example.com'
];
$client = new OAuthClient($options);
$this->assertEquals('GET', $client->getRequestMethod());
$this->assertEquals('http://www.example.com', $client->getSiteUrl());
}
public function testOauthClientUsingGetRequestParametersForSignature()
{
$mock = $this->getMockBuilder(Utility::class)
->disableOriginalConstructor()
->setMethods(['generateTimestamp', 'generateNonce'])
->getMock();
$mock
->expects($this->once())
->method('generateTimestamp')
->will($this->returnValue('123456789'));
$mock
->expects($this->once())
->method('generateNonce')
->will($this->returnValue('67648c83ba9a7de429bd1b773fb96091'));
$token = new Token\Access(null, $mock);
$token->setToken('123')
->setTokenSecret('456');
$client = new OAuthClient([
'token' => $token
], 'http://www.example.com');
$client->getRequest()->getQuery()->set('foo', 'bar');
$client->prepareOAuth();
// @codingStandardsIgnoreLine
$header = 'OAuth realm="",oauth_consumer_key="",oauth_nonce="67648c83ba9a7de429bd1b773fb96091",oauth_signature_method="HMAC-SHA1",oauth_timestamp="123456789",oauth_version="1.0",oauth_token="123",oauth_signature="fzWiYe4gZ2wkEMp9bEzWnlD88KE%3D"';
$this->assertEquals($header, $client->getHeader('Authorization'));
}
public function testOauthClientUsingPostRequestParametersForSignature()
{
$mock = $this->getMockBuilder(Utility::class)
->disableOriginalConstructor()
->setMethods(['generateTimestamp', 'generateNonce'])
->getMock();
$mock
->expects($this->once())
->method('generateTimestamp')
->will($this->returnValue('123456789'));
$mock
->expects($this->once())
->method('generateNonce')
->will($this->returnValue('67648c83ba9a7de429bd1b773fb96091'));
$token = new Token\Access(null, $mock);
$token->setToken('123')
->setTokenSecret('456');
$client = new OAuthClient([
'token' => $token
], 'http://www.example.com');
$client->getRequest()->getPost()->set('foo', 'bar');
$client->prepareOAuth();
// @codingStandardsIgnoreLine
$header = 'OAuth realm="",oauth_consumer_key="",oauth_nonce="67648c83ba9a7de429bd1b773fb96091",oauth_signature_method="HMAC-SHA1",oauth_timestamp="123456789",oauth_version="1.0",oauth_token="123",oauth_signature="fzWiYe4gZ2wkEMp9bEzWnlD88KE%3D"';
$this->assertEquals($header, $client->getHeader('Authorization'));
}
public function testOauthClientUsingPostAndGetRequestParametersForSignature()
{
$mock = $this->getMockBuilder(Utility::class)
->disableOriginalConstructor()
->setMethods(['generateTimestamp', 'generateNonce'])
->getMock();
$mock
->expects($this->once())
->method('generateTimestamp')
->will($this->returnValue('123456789'));
$mock
->expects($this->once())
->method('generateNonce')
->will($this->returnValue('67648c83ba9a7de429bd1b773fb96091'));
$token = new Token\Access(null, $mock);
$token->setToken('123')
->setTokenSecret('456');
$client = new OAuthClient([
'token' => $token
], 'http://www.example.com');
$client->getRequest()->getPost()->set('foo', 'bar');
$client->getRequest()->getQuery()->set('baz', 'bat');
$client->prepareOAuth();
// @codingStandardsIgnoreLine
$header = 'OAuth realm="",oauth_consumer_key="",oauth_nonce="67648c83ba9a7de429bd1b773fb96091",oauth_signature_method="HMAC-SHA1",oauth_timestamp="123456789",oauth_version="1.0",oauth_token="123",oauth_signature="qj3FYtStzP083hT9QkqCdxsMauw%3D"';
$this->assertEquals($header, $client->getHeader('Authorization'));
}
public function testOAuthClientDoesntOverrideExistingHeaders()
{
$mock = $this->getMockBuilder(Utility::class)
->disableOriginalConstructor()
->setMethods(['generateTimestamp', 'generateNonce'])
->getMock();
$mock
->expects($this->once())
->method('generateTimestamp')
->will($this->returnValue('123456789'));
$mock
->expects($this->once())
->method('generateNonce')
->will($this->returnValue('67648c83ba9a7de429bd1b773fb96091'));
$token = new Token\Access(null, $mock);
$token->setToken('123')
->setTokenSecret('456');
$client = new OAuthClient([
'token' => $token
], 'http://www.example.com');
$dummyHeader = Header\ContentType::fromString('Content-Type: application/octet-stream');
$headers = $client->getRequest()->getHeaders();
$headers->addHeaders([$dummyHeader]);
$client->prepareOAuth();
$this->assertTrue($client->getRequest()->getHeaders()->has('Content-Type'));
$this->assertEquals($dummyHeader, $client->getRequest()->getHeaders()->get('Content-Type'));
}
}
PK nuTen ) test/Config/StandardConfigurationTest.phpnu ٘ 'https://example.com/oauth/'
]
);
$this->assertEquals('https://example.com/oauth/authorize', $config->getAuthorizeUrl());
$this->assertEquals('https://example.com/oauth/request_token', $config->getRequestTokenUrl());
$this->assertEquals('https://example.com/oauth/access_token', $config->getAccessTokenUrl());
}
}
PK nuTa5 5 test/Token/AccessTest.phpnu ٘ assertInstanceOf('Laminas\\Http\\Response', $token->getResponse());
}
public function testConstructorParsesRequestTokenFromResponseBody()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$response = new HTTPResponse;
$response->setContent($body)
->setStatusCode(200);
$token = new AccessToken($response);
$this->assertEquals('jZaee4GF52O3lUb9', $token->getToken());
}
public function testConstructorParsesRequestTokenSecretFromResponseBody()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$response = new HTTPResponse;
$response->setContent($body)
->setStatusCode(200);
$token = new AccessToken($response);
$this->assertEquals('J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri', $token->getTokenSecret());
}
public function testPropertyAccessWorks()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri&foo=bar';
$response = new HTTPResponse;
$response->setContent($body)
->setStatusCode(200);
$token = new AccessToken($response);
$this->assertEquals('J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri', $token->oauth_token_secret);
}
public function testTokenCastsToEncodedResponseBody()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$token = new AccessToken();
$token->setToken('jZaee4GF52O3lUb9');
$token->setTokenSecret('J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri');
$this->assertEquals($body, (string) $token);
}
public function testToStringReturnsEncodedResponseBody()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$token = new AccessToken();
$token->setToken('jZaee4GF52O3lUb9');
$token->setTokenSecret('J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri');
$this->assertEquals($body, $token->toString());
}
public function testIsValidDetectsBadResponse()
{
$body = 'oauthtoken=jZaee4GF52O3lUb9&oauthtokensecret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$response = new HTTPResponse;
$response->setContent($body)
->setStatusCode(200);
$token = new AccessToken($response);
$this->assertFalse($token->isValid());
}
public function testIsValidDetectsGoodResponse()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$response = new HTTPResponse;
$response->setContent($body)
->setStatusCode(200);
$token = new AccessToken($response);
$this->assertTrue($token->isValid());
}
public function testToHeaderReturnsValidHeaderString()
{
$token = new AccessToken(null, new HTTPUtility90244());
$value = $token->toHeader(
'http://www.example.com',
new Config90244()
);
// @codingStandardsIgnoreLine
$this->assertEquals('OAuth realm="",oauth_consumer_key="1234567890",oauth_nonce="e807f1fcf82d132f9bb018ca6738a19f",oauth_signature_method="HMAC-SHA1",oauth_timestamp="12345678901",oauth_version="1.0",oauth_token="abcde",oauth_signature="6fb42da0e32e07b61c9f0251fe627a9c"', $value);
}
}
PK nuT# $ test/Token/AuthorizedRequestTest.phpnu ٘ 'bar'];
$token = new AuthorizedRequestToken($data);
$this->assertEquals($data, $token->getData());
}
public function testConstructorParsesAccessTokenFromInputData()
{
$data = [
'oauth_token' => 'jZaee4GF52O3lUb9'
];
$token = new AuthorizedRequestToken($data);
$this->assertEquals('jZaee4GF52O3lUb9', $token->getToken());
}
public function testPropertyAccessWorks()
{
$data = [
'oauth_token' => 'jZaee4GF52O3lUb9'
];
$token = new AuthorizedRequestToken($data);
$this->assertEquals('jZaee4GF52O3lUb9', $token->oauth_token);
}
public function testTokenCastsToEncodedQueryString()
{
$queryString = 'oauth_token=jZaee4GF52O3lUb9&foo%20=bar~';
$token = new AuthorizedRequestToken();
$token->setToken('jZaee4GF52O3lUb9');
$token->setParam('foo ', 'bar~');
$this->assertEquals($queryString, (string) $token);
}
public function testToStringReturnsEncodedQueryString()
{
$queryString = 'oauth_token=jZaee4GF52O3lUb9';
$token = new AuthorizedRequestToken();
$token->setToken('jZaee4GF52O3lUb9');
$this->assertEquals($queryString, $token->toString());
}
public function testIsValidDetectsBadResponse()
{
$data = [
'missing_oauth_token' => 'jZaee4GF52O3lUb9'
];
$token = new AuthorizedRequestToken($data);
$this->assertFalse($token->isValid());
}
public function testIsValidDetectsGoodResponse()
{
$data = [
'oauth_token' => 'jZaee4GF52O3lUb9',
'foo' => 'bar'
];
$token = new AuthorizedRequestToken($data);
$this->assertTrue($token->isValid());
}
}
PK nuTtvP[ [ test/Token/RequestTest.phpnu ٘ assertInstanceOf(HTTPResponse::class, $token->getResponse());
}
public function testConstructorParsesRequestTokenFromResponseBody()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$response = new HTTPResponse;
$response->setContent($body)
->setStatusCode(200);
$token = new RequestToken($response);
$this->assertEquals('jZaee4GF52O3lUb9', $token->getToken());
}
public function testConstructorParsesRequestTokenSecretFromResponseBody()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$response = new HTTPResponse;
$response->setContent($body)
->setStatusCode(200);
$token = new RequestToken($response);
$this->assertEquals('J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri', $token->getTokenSecret());
}
public function testPropertyAccessWorks()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri&foo=bar';
$response = new HTTPResponse;
$response->setContent($body)
->setStatusCode(200);
$token = new RequestToken($response);
$this->assertEquals('J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri', $token->oauth_token_secret);
}
public function testTokenCastsToEncodedResponseBody()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$token = new RequestToken();
$token->setToken('jZaee4GF52O3lUb9');
$token->setTokenSecret('J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri');
$this->assertEquals($body, (string) $token);
}
public function testToStringReturnsEncodedResponseBody()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$token = new RequestToken();
$token->setToken('jZaee4GF52O3lUb9');
$token->setTokenSecret('J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri');
$this->assertEquals($body, $token->toString());
}
public function testIsValidDetectsBadResponse()
{
$body = 'oauthtoken=jZaee4GF52O3lUb9&oauthtokensecret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$response = new HTTPResponse(200, [], $body);
$token = new RequestToken($response);
$this->assertFalse($token->isValid());
}
public function testIsValidDetectsGoodResponse()
{
$body = 'oauth_token=jZaee4GF52O3lUb9&oauth_token_secret=J4Ms4n8sxjYc0A8K0KOQFCTL0EwUQTri';
$response = new HTTPResponse;
$response->setContent($body)
->setStatusCode(200);
$token = new RequestToken($response);
$this->assertTrue($token->isValid());
}
}
PK nuTf{ test/Signature/PlaintextTest.phpnu ٘ '1.0',
'oauth_consumer_key' => 'dpf43f3p2l4k3l03',
'oauth_signature_method' => 'PLAINTEXT',
'oauth_timestamp' => '1191242090',
'oauth_nonce' => 'hsu94j3884jdopsl',
'oauth_version' => '1.0'
];
$signature = new Signature\Plaintext('1234567890');
$this->assertEquals('1234567890&', $signature->sign($params));
}
public function testSignatureWithAccessSecretIsConsumerAndAccessSecretStringsConcatWithAmp()
{
$params = [
'oauth_version' => '1.0',
'oauth_consumer_key' => 'dpf43f3p2l4k3l03',
'oauth_signature_method' => 'PLAINTEXT',
'oauth_timestamp' => '1191242090',
'oauth_nonce' => 'hsu94j3884jdopsl',
'oauth_version' => '1.0'
];
$signature = new Signature\Plaintext('1234567890', '0987654321');
$this->assertEquals('1234567890&0987654321', $signature->sign($params));
}
}
PK nuT^ͫ test/Signature/RSATest.phpnu ٘ markTestIncomplete('Laminas\\Crypt\\Rsa finalisation outstanding');
}
public function testSignatureWithAccessSecretIsHashedWithConsumerAndAccessSecret()
{
$this->markTestIncomplete('Laminas\\Crypt\\Rsa finalisation outstanding');
}
}
PK nuT#X: : test/Signature/AbstractTest.phpnu ٘ assertEquals('http://www.example.com/REQUEST', $sign->normaliseBaseSignatureUrl($url));
}
public function testNormaliseHttpsBaseSignatureUrl()
{
$sign = new Signature\Plaintext('foo');
$url = 'HTTPS://WWW.EXAMPLE.COM:443/REQUEST';
$this->assertEquals('https://www.example.com/REQUEST', $sign->normaliseBaseSignatureUrl($url));
}
public function testNormaliseHttpPortBaseSignatureUrl()
{
$sign = new Signature\Plaintext('foo');
$url = 'HTTP://WWW.EXAMPLE.COM:443/REQUEST';
$this->assertEquals('http://www.example.com:443/REQUEST', $sign->normaliseBaseSignatureUrl($url));
}
public function testNormaliseHttpsPortBaseSignatureUrl()
{
$sign = new Signature\Plaintext('foo');
$url = 'HTTPS://WWW.EXAMPLE.COM:80/REQUEST';
$this->assertEquals('https://www.example.com:80/REQUEST', $sign->normaliseBaseSignatureUrl($url));
}
public function testNormaliseHttpsRemovesFragmentFromBaseSignatureUrl()
{
$sign = new Signature\Plaintext('foo');
$url = 'https://www.example.com/request#foo';
$this->assertEquals('https://www.example.com/request', $sign->normaliseBaseSignatureUrl($url));
}
public function testNormaliseHttpsRemovesQueryFromBaseSignatureUrl()
{
$sign = new Signature\Plaintext('foo');
$url = 'https://www.example.com/request?foo=bar';
$this->assertEquals('https://www.example.com/request', $sign->normaliseBaseSignatureUrl($url));
}
}
PK nuTZ test/Signature/HMACTest.phpnu ٘ '1.0',
'oauth_consumer_key' => 'dpf43f3p2l4k3l03',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => '1191242090',
'oauth_nonce' => 'hsu94j3884jdopsl',
'oauth_version' => '1.0'
];
$signature = new Signature\Hmac('1234567890', null, 'SHA1');
$this->assertEquals('XYkaERjLVjp2yP/klDCGQ+hZ2So=', $signature->sign($params));
}
public function testSignatureWithAccessSecretIsHashedWithConsumerAndAccessSecret()
{
$params = [
'oauth_version' => '1.0',
'oauth_consumer_key' => 'dpf43f3p2l4k3l03',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => '1191242090',
'oauth_nonce' => 'hsu94j3884jdopsl',
'oauth_version' => '1.0'
];
$signature = new Signature\Hmac('1234567890', '0987654321', 'SHA1');
$this->assertEquals('b0J6H0jCEo+tvzVJy2G615sM6/M=', $signature->sign($params));
}
}
PK nuTI phpunit.xml.distnu ٘
./src
./test
PK nuT
composer.jsonnu ٘ {
"name": "laminas/laminas-oauth",
"description": " ",
"license": "BSD-3-Clause",
"keywords": [
"laminas",
"oauth"
],
"homepage": "https://laminas.dev",
"support": {
"issues": "https://github.com/laminas/laminas-oauth/issues",
"source": "https://github.com/laminas/laminas-oauth",
"rss": "https://github.com/laminas/laminas-oauth/releases.atom",
"chat": "https://laminas.dev/chat",
"forum": "https://discourse.laminas.dev"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0",
"laminas/laminas-config": "^3.7",
"laminas/laminas-crypt": "^3.6.0",
"laminas/laminas-http": "^2.15",
"laminas/laminas-i18n": "^2.13.0",
"laminas/laminas-loader": "^2.8",
"laminas/laminas-math": "^3.5",
"laminas/laminas-stdlib": "^3.10",
"laminas/laminas-uri": "^2.9"
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
"phpunit/phpunit": "^9.5.5"
},
"autoload": {
"psr-4": {
"Laminas\\OAuth\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"LaminasTest\\OAuth\\": "test/"
}
},
"scripts": {
"static-analysis": "psalm --shepherd --stats"
},
"conflict": {
"zendframework/zendoauth": "*"
}
}
PK nuTK8%
LICENSE.mdnu ٘ PK nuTF[ [ COPYRIGHT.mdnu ٘ PK nuT߇ .laminas-ci.jsonnu ٘ PK nuTʻ
composer.locknu ٘ PK nuTԅWl l README.mdnu ٘ PK nuT{?m
e .gitignorenu ٘ PK nuT src/Consumer.phpnu ٘ PK nuT/% " src/Exception/RuntimeException.phpnu ٘ PK nuTMl $ src/Exception/ExceptionInterface.phpnu ٘ PK nuTՋ ( src/Exception/BadMethodCallException.phpnu ٘ PK nuT#Ry * src/Exception/InvalidArgumentException.phpnu ٘ PK nuT9
src/OAuth.phpnu ٘ PK nuTD" " src/Client.phpnu ٘ PK nuT^ src/Http/UserAuthorization.phpnu ٘ PK nuT8# # Q src/Http/RequestToken.phpnu ٘ PK nuT . src/Http/AccessToken.phpnu ٘ PK nuTJ8 8 @ src/Http/Utility.phpnu ٘ PK nuTm4zg g aV src/Http.phpnu ٘ PK nuT{M v src/Config/ConfigInterface.phpnu ٘ PK nuT+;(= = z src/Config/StandardConfig.phpnu ٘ PK nuT%,v v src/Token/AuthorizedRequest.phpnu ٘ PK nuTH
src/Token/AbstractToken.phpnu ٘ PK nuTd@ src/Token/Request.phpnu ٘ PK nuT˥n n a src/Token/Access.phpnu ٘ PK nuT`* * src/Token/TokenInterface.phpnu ٘ PK nuTnS S src/Signature/Plaintext.phpnu ٘ PK nuTZ1@ @ $ ' src/Signature/SignatureInterface.phpnu ٘ PK nuTcǏ src/Signature/Hmac.phpnu ٘ PK nuTYW W # src/Signature/AbstractSignature.phpnu ٘ PK nuTB, Z src/Signature/Rsa.phpnu ٘ PK nuT= ! phpcs.xml.distnu ٘ PK nuT_/6 6 8 .github/workflows/auto-close.ymlnu ٘ PK nuT`S , .github/workflows/continuous-integration.ymlnu ٘ PK nuTu|e)
1 .github/workflows/release-on-milestone-closed.ymlnu ٘ PK nuT "
! test/TestAsset/HTTPClient32874.phpnu ٘ PK nuTum33 3 # -" test/TestAsset/HTTPUtility90244.phpnu ٘ PK nuT " $ test/TestAsset/HTTPClient39745.phpnu ٘ PK nuT% % test/TestAsset/Token34879.phpnu ٘ PK nuT & test/TestAsset/Config90244.phpnu ٘ PK nuTZa ! ) test/TestAsset/Consumer32874b.phpnu ٘ PK nuT7 + test/TestAsset/Consumer34879.phpnu ٘ PK nuT')8 8 - test/TestAsset/Consumer39745.phpnu ٘ PK nuTC $ |0 test/TestAsset/RequestToken39745.phpnu ٘ PK nuT5u u % 1 test/TestAsset/HTTPClient19485876.phpnu ٘ PK nuT8 _2 test/TestAsset/Consumer48231.phpnu ٘ PK nuTZ 3 3 # 4 test/TestAsset/HTTPUtility32874.phpnu ٘ PK nuT]J! !
7 test/TestAsset/Consumer32874.phpnu ٘ PK nuTc3 3 # ~9 test/TestAsset/HTTPUtility39745.phpnu ٘ PK nuT{ # < test/TestAsset/AccessToken48231.phpnu ٘ PK nuTo$j $ = test/TestAsset/RequestToken48231.phpnu ٘ PK nuT;I ? test/Http/RequestTokenTest.phpnu ٘ PK nuTۂ \ test/Http/AccessTokenTest.phpnu ٘ PK nuT@7Q Q # s test/Http/UserAuthorizationTest.phpnu ٘ PK nuTo
] z test/Http/UtilityTest.phpnu ٘ PK nuTo L test/ConsumerTest.phpnu ٘ PK nuT% ) test/OAuthTest.phpnu ٘ PK nuTen ) ~ test/Config/StandardConfigurationTest.phpnu ٘ PK nuTa5 5 test/Token/AccessTest.phpnu ٘ PK nuT# $ test/Token/AuthorizedRequestTest.phpnu ٘ PK nuTtvP[ [ m test/Token/RequestTest.phpnu ٘ PK nuTf{ test/Signature/PlaintextTest.phpnu ٘ PK nuT^ͫ O test/Signature/RSATest.phpnu ٘ PK nuT#X: : s test/Signature/AbstractTest.phpnu ٘ PK nuTZ test/Signature/HMACTest.phpnu ٘ PK nuTI I phpunit.xml.distnu ٘ PK nuT
composer.jsonnu ٘ PK B B