danielburger1337 / oauth2-dpop
Create/Verify OAuth2 DPoP tokens.
Requires
- php: ^8.2
- psr/clock: ^1.0
- spomky-labs/base64url: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.50.0
- nyholm/psr7: ^1.8
- paragonie/constant_time_encoding: ^2.6
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^11.0
- psr/cache: ^3.0
- psr/http-message: ^2.0
- spomky-labs/otphp: ^11.2
- symfony/clock: ^7.0
- symfony/http-foundation: ^7.0
- web-token/jwt-library: ^3.3
This package is auto-updated.
Last update: 2024-11-04 21:12:22 UTC
README
danielburger1337/oauth2-dpop
A PHP 8.2+ library that helps you both create and/or verify OAuth2 DPoP proof tokens.
Demonstrating Proof of Possession (DPoP) is an application-level mechanism for sender-constraining OAuth [RFC6749] access and refresh tokens. It enables a client to prove the possession of a public/private key pair by including a DPoP header in an HTTP request. The value of the header is a JSON Web Token (JWT) [RFC7519] that enables the authorization server to bind issued tokens to the public part of a client's key pair. Recipients of such tokens are then able to verify the binding of the token to the key pair that the client has demonstrated that it holds via the DPoP header, thereby providing some assurance that the client presenting the token also possesses the private key. In other words, the legitimate presenter of the token is constrained to be the sender that holds and proves possession of the private part of the key pair.
~ Section 1 of RFC-9449
Install
This library is PSR-4 compatible and can be installed via PHP's dependency manager Composer.
composer require danielburger1337/oauth2-dpop
Documentation
You can find the documentation here.
Running Tests Locally
This library is fully unit tested. It also uses strict static analysis to minimize the possibility of unexpected runtime errors.
composer install vendor/bin/php-cs-fixer fix vendor/bin/phpstan vendor/bin/phpunit
License
This software is available under the MIT license.