auth0 / auth0-PHP

PHP SDK for Auth0 Authentication and Management APIs.
https://auth0.com/docs/libraries/auth0-php
MIT License
382 stars 212 forks source link

[SDK-4141] Add support for Pushed Authorization Requests #714

Closed evansims closed 1 year ago

evansims commented 1 year ago

Description

This PR adds support for Pushed Authorization Requests (PAR).

Auth0\SDK\Configuration\SdkConfiguration changes:

Auth0\SDK\API\Authentication\PushedAuthorizationRequest has been added, with two methods:

Auth0\SDK\API\Authentication changes:

Auth0\SDK\Auth0 changes:

Auth0\SDK\Exception\Authentication\ParResponseException added:

Testing and Documentation changes:

Example usage:

<?php

$configuration = new SdkConfiguration(
  pushedAuthorizationRequest: true,
  // ...
);

$sdk = new Auth0($configuration);

$sdk->login();
codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (0ccecdf) 100.00% compared to head (2ee277e) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #714 +/- ## =========================================== Coverage 100.00% 100.00% - Complexity 1299 1311 +12 =========================================== Files 61 62 +1 Lines 4537 4587 +50 =========================================== + Hits 4537 4587 +50 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `100.00% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/auth0/auth0-PHP/pull/714?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | Coverage Δ | | |---|---|---| | [src/API/Authentication.php](https://codecov.io/gh/auth0/auth0-PHP/pull/714?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-c3JjL0FQSS9BdXRoZW50aWNhdGlvbi5waHA=) | `100.00% <100.00%> (ø)` | | | [.../API/Authentication/PushedAuthorizationRequest.php](https://codecov.io/gh/auth0/auth0-PHP/pull/714?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-c3JjL0FQSS9BdXRoZW50aWNhdGlvbi9QdXNoZWRBdXRob3JpemF0aW9uUmVxdWVzdC5waHA=) | `100.00% <100.00%> (ø)` | | | [src/Auth0.php](https://codecov.io/gh/auth0/auth0-PHP/pull/714?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-c3JjL0F1dGgwLnBocA==) | `100.00% <100.00%> (ø)` | | | [src/Configuration/SdkConfiguration.php](https://codecov.io/gh/auth0/auth0-PHP/pull/714?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-c3JjL0NvbmZpZ3VyYXRpb24vU2RrQ29uZmlndXJhdGlvbi5waHA=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

evansims commented 1 year ago

Thanks for the review @Widcket, I've pushed some changes based on your feedback