kdubuc / scaleway-container-auth-psr15
PSR15 Scaleway Container Authentication Middleware
Requires
- php: ^7.1 || ^8.0
- firebase/php-jwt: ^6.2
- phpseclib/phpseclib: ^3.0
- psr/http-server-middleware: ^1.0
Requires (Dev)
- guzzlehttp/psr7: ^2.2.1
- kdubuc/php-cs-fixer-rules: ^1.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2023-12-19 22:49:39 UTC
README
Deprecation notice : Scaleway Container Authentication has been deprecated because the authorization process is built-in now.
Private Scaleway Containers allows you to restrict access to them which prevents unauthorized access. Contrary to private functions where the authorization process is built-in, it needs to be configured inside the container. (see https://www.scaleway.com/en/docs/compute/containers/api-cli/restricting-access-to-a-container)
This PSR15 Middleware provide runtime token validation to manage authentication access to the Scaleway Container.
Install
Via Composer
$ composer require kdubuc/scaleway-container-auth-psr15
Usage
$middleware = new ScalewayContainerAuthMiddleware([ 'auth_header_name' => 'Scaleway-Auth-Token', // header which containing auth token (default : Scaleway-Auth-Token) 'auth_header_regex' => ScalewayContainerAuthMiddleware::JWT_REGEX, // regex to catch token in header (default : [jwt]) 'env' => [], // to override environment variables (for testing purpose) ]);
Testing
$ vendor/bin/phpunit tests/
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email kevindubuc62@gmail.com instead of using the issue tracker.
Credits
License
The CeCILL-B License. Please see License File for more information.