timrourke / incognito
A suite of tools for working with AWS Cognito
Requires
- php: >=7.4
- ext-gmp: *
- ext-json: *
- ext-mbstring: *
- lib-openssl: *
- aws/aws-sdk-php: ^3.52
- beberlei/assert: ^2.9|^3.0
- guzzlehttp/guzzle: ^6.3
- psr/cache: ^1.0
- psr/http-message: ^1.0
- psr/http-server-middleware: 1.0.1
- web-token/jwt-checker: ^1.0
- web-token/jwt-core: ^1.0
- web-token/jwt-signature: ^1.0
Requires (Dev)
- phpstan/phpstan: ^0.12.19
- phpunit/phpunit: ^7.0
- squizlabs/php_codesniffer: ^3.3
- symfony/process: ^4.1
- dev-master
- dev-dependabot/composer/aws/aws-sdk-php-3.186.3
- dev-dependabot/composer/phpstan/phpstan-0.12.94
- dev-dependabot/composer/symfony/process-5.3.4
- dev-dependabot/add-v2-config-file
- dev-dependabot/composer/beberlei/assert-3.3.1
- dev-dependabot/composer/squizlabs/php_codesniffer-3.6.0
- dev-dependabot/composer/guzzlehttp/guzzle-7.3.0
- dev-dependabot/composer/phpunit/phpunit-9.4.0
This package is auto-updated.
Last update: 2025-03-29 00:21:41 UTC
README
A suite of tools for working with AWS Cognito
In alpha
Development of this library is still in progress. Contributions are welcome and encouraged.
Goals
AWS Cognito is a very robust (and complicated) product that provides a user identity and authentication framework. However, its documentation is a little challenging to digest, and there aren't a ton of great examples in the wild for how to integrate this service into a PHP application. The goal of this project is to provide a few framework-agnostic tools to make it a little easier to work with AWS Cognito, and the JSON Web Tokens (JWTs) it issues.
This library seeks to provide:
- A PSR-15 middleware for authenticating HTTP requests bearing a JWT issued by AWS Cognito
- A factory to build a PSR-7 response in the event of an unauthenticated request
- A keychain service for fetching and caching the public RSA keyset for your AWS Cognito User Pool
- Several HTTP services useful for initiating authentication and user management flows in an AWS Cognito User Pool