gabyquiles / auth-bundle
Provide the verification for jwt from AWS Cognito
Installs: 9 222
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.2
- codercat/jwk-to-pem: 0.0.3
- lexik/jwt-authentication-bundle: ^2.12
- symfony/framework-bundle: ^3.4|^4.0
- symfony/http-client: 4.4
- symfony/security-bundle: ^3.4|^4.0
Requires (Dev)
- ext-json: *
- friendsofphp/php-cs-fixer: ^1.1|^2.8
- matthiasnoback/symfony-dependency-injection-test: ^4.2
- nyholm/symfony-bundle-test: ^1.8
- symfony/browser-kit: ^3.4|^4.0
- symfony/console: ^3.4|^4.0
- symfony/dom-crawler: ^3.4|^4.0
- symfony/phpunit-bridge: ^3.4|^4.0
- symfony/var-dumper: ^3.4|^4.0
- symfony/yaml: ^3.4|^4.0
This package is auto-updated.
Last update: 2025-03-01 00:29:06 UTC
README
This bundle decode and verifies a AWS JWT to allow users authenticated with AWS Cognito to access your services.
Installation
composer require gabyquiles/auth-bundle
Configuration
Add config/gaby_quiles_auth_jws.yaml
gaby_quiles_auth_jws:
token_ttl: 3601
clock_skew: 1
pool_id: '%pool_id%'
region: '%aws_region%'
Mocking
When you are testing your application you want to isolate your application. In those cases you can use override the provider in /config/services_test.yaml
for the TestProvider:
services:
gaby_quiles_auth_jws.aws_jwt_provider:
class: GabyQuiles\Auth\Providers\TestProvider
This provider will receive a base64 encoded json token like:
{"username": "admin","exp": 1570899818,"iat": 1570896218,"email": "user@example.com"}