├── .github └── workflows │ └── read-only.yml ├── Client ├── AuthenticationPlugin.php ├── CustomQueryResolver.php ├── Exception │ └── InvalidFetchModeException.php └── Plugin │ └── AuthenticationRegistry.php ├── LICENSE ├── README.md └── composer.json /.github/workflows/read-only.yml: -------------------------------------------------------------------------------- 1 | name: read-only 2 | on: pull_request_target 3 | jobs: 4 | write_message: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: superbrothers/close-pull-request@v3 8 | with: 9 | comment: | 10 | Hey! 11 | Thanks for your PR and contributing to Jane! 12 | But this repository is read-only, if you want to contribute to Jane, please submit your PR to https://github.com/janephp/janephp. 13 | env: 14 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 15 | -------------------------------------------------------------------------------- /Client/AuthenticationPlugin.php: -------------------------------------------------------------------------------- 1 | getHeader(self::SCOPES_HEADER); 23 | 24 | foreach ($this->authenticationPlugins as $authenticationPlugin) { 25 | if (\in_array($authenticationPlugin->getScope(), $scopes)) { 26 | $request = $authenticationPlugin->authentication($request); 27 | } 28 | } 29 | 30 | // clean headers 31 | $request = $request->withoutHeader(self::SCOPES_HEADER); 32 | 33 | return $next($request); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2016-2017 Joel Wurtz 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jane OpenApi Runtime 2 | 3 | Dependencies and utility classes for a library generated by [Jane OpenApi](https://github.com/janephp/open-api) 4 | 5 | ## License 6 | 7 | View the [LICENSE](LICENSE) file attach to this project. 8 | 9 | ## Resources 10 | 11 | * [Documentation](http://jane.readthedocs.io/en/latest/) 12 | * [Contributing](https://github.com/janephp/janephp/blob/master/CONTRIBUTING.md) 13 | * [Report Issues](https://github.com/janephp/janephp/issues) and [send Pull Requests](https://github.com/janephp/janephp/pulls) 14 | in the [main Jane Repository](https://github.com/janephp/janephp) 15 | 16 | ## Sponsor 17 | 18 | [![JoliCode](https://jolicode.com/images/logo.svg)](https://jolicode.com) 19 | 20 | Open Source time sponsored by JoliCode 21 | 22 | ## Credits 23 | 24 | * [All contributors](https://github.com/jolicode/jane/graphs/contributors) 25 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jane-php/open-api-runtime", 3 | "type": "library", 4 | "description": "Jane OpenAPI Runtime Library, dependencies and utility class for a library generated by jane/openapi", 5 | "license": "MIT", 6 | "authors": [ 7 | { 8 | "name": "Joel Wurtz", 9 | "email": "jwurtz@jolicode.com" 10 | }, 11 | { 12 | "name": "Baptiste Leduc", 13 | "email": "baptiste.leduc@gmail.com" 14 | } 15 | ], 16 | "autoload": { 17 | "psr-4": { 18 | "Jane\\Component\\OpenApiRuntime\\": "" 19 | }, 20 | "exclude-from-classmap": [ 21 | "/Tests/" 22 | ] 23 | }, 24 | "require": { 25 | "php": "^8.1", 26 | "jane-php/json-schema-runtime": "^7.0", 27 | "nyholm/psr7": "^1.8", 28 | "php-http/client-common": "^2.0", 29 | "php-http/discovery": "^1.6", 30 | "php-http/multipart-stream-builder": "^1.0", 31 | "psr/http-client": "^1.0", 32 | "psr/http-factory": "^1.0", 33 | "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0" 34 | }, 35 | "require-dev": { 36 | "phpunit/phpunit": "^8.5", 37 | "symfony/serializer": "^5.4 || ^6.4 || ^7.0" 38 | }, 39 | "extra": { 40 | "branch-alias": { 41 | "dev-next": "7-dev" 42 | } 43 | }, 44 | "config": { 45 | "process-timeout": 1800, 46 | "sort-packages": true, 47 | "allow-plugins": { 48 | "php-http/discovery": true 49 | } 50 | }, 51 | "minimum-stability": "dev", 52 | "prefer-stable": true 53 | } 54 | --------------------------------------------------------------------------------