Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup double+EOL spaces #1461

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:

- name: Install Dependencies
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress

- name: Run Codesniffer
run: vendor/bin/phpcs
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:

- name: Run Static Analysis
run: vendor/bin/phpstan analyse

2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
with:
fetch-depth: 0

- name: Setup PHP
Expand Down
22 changes: 11 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed
- In the Auth Code grant, when requesting an access token with an invalid auth code, we now respond with an invalid_grant error instead of invalid_request (PR #1433)
- Fixed spec compliance issue where device access token request was mistakenly expecting to receive scopes in the request (PR #1412)
- Fixed spec compliance issue where device access token request was mistakenly expecting to receive scopes in the request (PR #1412)
- Refresh tokens pre version 9 might have had user IDs set as ints which meant they were incorrectly rejected. We now cast these values to strings to allow old refresh tokens (PR #1436)

## [9.0.1] - released 2024-10-14
### Fixed
- Auto-generated event emitter is now persisted. Previously, a new emitter was generated every time (PR #1428)
- Fixed bug where you could not omit a redirect uri even if one had not been specified during the auth request (PR #1428)
- Fixed bug where "state" parameter wasn't present on `invalid_scope` error response and wasn't on fragment part of `access_denied` redirect URI on Implicit grant (PR #1298)
- Fixed bug where "state" parameter wasn't present on `invalid_scope` error response and wasn't on fragment part of `access_denied` redirect URI on Implicit grant (PR #1298)
- Fixed bug where disabling refresh token revocation via `revokeRefreshTokens(false)` unintentionally disables issuing new refresh token (PR #1449)

## [9.0.0] - released 2024-05-13
Expand Down Expand Up @@ -71,13 +71,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [8.5.3] - released 2023-07-06
### Security
- If a key string is provided to the CryptKey constructor with an invalid
passphrase, the LogicException message generated will expose the given key.
- If a key string is provided to the CryptKey constructor with an invalid
passphrase, the LogicException message generated will expose the given key.
The key is no longer leaked via this exception (PR #1353)

## [8.5.2] - released 2023-06-16
### Changed
- Bumped the versions for laminas/diactoros and psr/http-message to support
- Bumped the versions for laminas/diactoros and psr/http-message to support
PSR-7 v2.0 (PR #1339)

## [8.5.1] - released 2023-04-04
Expand Down Expand Up @@ -169,13 +169,13 @@ a PKCE downgrade attack (PR #1326)
- Removed support for PHP 7.2 (PR #1146)

### Fixed
- Fix typo in parameter hint. `code_challenged` changed to `code_challenge`. Thrown by Auth Code Grant when the code challenge does not match the regex. (PR #1130)
- Fix typo in parameter hint. `code_challenged` changed to `code_challenge`. Thrown by Auth Code Grant when the code challenge does not match the regex. (PR #1130)
- Undefined offset was returned when no client redirect URI was set. Now throw an invalidClient exception if no redirect URI is set against a client (PR #1140)

## [8.1.1] - released 2020-07-01

### Fixed
- If you provide a valid redirect_uri with the auth code grant and an invalid scope, the server will use the given
- If you provide a valid redirect_uri with the auth code grant and an invalid scope, the server will use the given
redirect_uri instead of the default client redirect uri (PR #1126)

## [8.1.0] - released 2020-04-29
Expand All @@ -195,9 +195,9 @@ redirect_uri instead of the default client redirect uri (PR #1126)
### Fixed
- Clients are now explicitly prevented from using the Client Credentials grant unless they are confidential to conform
with the OAuth2 spec (PR #1035)
- Abstract method `getIdentifier()` added to AccessTokenTrait. The trait cannot be used without the `getIdentifier()`
- Abstract method `getIdentifier()` added to AccessTokenTrait. The trait cannot be used without the `getIdentifier()`
method being defined (PR #1051)
- An exception is now thrown if a refresh token is accidentally sent in place of an authorization code when using the
- An exception is now thrown if a refresh token is accidentally sent in place of an authorization code when using the
Auth Code Grant (PR #1057)
- Can now send access token request without being forced to specify a redirect URI (PR #1096)
- In the BearerTokenValidator, if an implementation is using PDO, there is a possibility that a RuntimeException will be thrown when checking if an access token is revoked. This scenario no longer incorrectly issues an exception with a hint mentioning an issue with JSON decoding. (PR #1107)
Expand Down Expand Up @@ -251,7 +251,7 @@ Auth Code Grant (PR #1057)
## [7.3.0] - released 2018-11-13

### Changed
- Moved the `finalizeScopes()` call from `validateAuthorizationRequest` method to the `completeAuthorizationRequest` method so it is called just before the access token is issued (PR #923)
- Moved the `finalizeScopes()` call from `validateAuthorizationRequest` method to the `completeAuthorizationRequest` method so it is called just before the access token is issued (PR #923)

### Added
- Added a ScopeTrait to provide an implementation for jsonSerialize (PR #952)
Expand Down Expand Up @@ -353,7 +353,7 @@ To address feedback from the security release the following change has been made
## [5.1.4] - 2017-07-01

- Fixed multiple security vulnerabilities as a result of a security audit paid for by the [Mozilla Secure Open Source Fund](https://wiki.mozilla.org/MOSS/Secure_Open_Source). All users of this library are encouraged to update as soon as possible to this version or version 6.0 or greater.
- It is recommended on each `AuthorizationServer` instance you set the `setEncryptionKey()`. This will result in stronger encryption being used. If this method is not set messages will be sent to the defined error handling routines (using `error_log`). Please see the examples and documentation for examples.
- It is recommended on each `AuthorizationServer` instance you set the `setEncryptionKey()`. This will result in stronger encryption being used. If this method is not set messages will be sent to the defined error handling routines (using `error_log`). Please see the examples and documentation for examples.
- TravisCI now tests PHP 7.1 (Issue #671)
- Fix middleware example fatal error (Issue #682)
- Fix typo in the first README sentence (Issue #690)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Out of the box it supports the following grants:
The following RFCs are implemented:

* [RFC6749 "OAuth 2.0"](https://tools.ietf.org/html/rfc6749)
* [RFC6750 " The OAuth 2.0 Authorization Framework: Bearer Token Usage"](https://tools.ietf.org/html/rfc6750)
* [RFC6750 "The OAuth 2.0 Authorization Framework: Bearer Token Usage"](https://tools.ietf.org/html/rfc6750)
* [RFC7519 "JSON Web Token (JWT)"](https://tools.ietf.org/html/rfc7519)
* [RFC7636 "Proof Key for Code Exchange by OAuth Public Clients"](https://tools.ietf.org/html/rfc7636)
* [RFC8628 "OAuth 2.0 Device Authorization Grant](https://tools.ietf.org/html/rfc8628)
Expand Down
6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ curl -X "POST" "http://localhost:4444/device_code.php/device_authorization" \
--data-urlencode "client_id=myawesomeapp" \
--data-urlencode "client_secret=abc123" \
--data-urlencode "scope=basic email"
```
```

We have set up the example so that a user ID is already associated with the device code. In a production application you
would implement an authorization view to allow a user to authorize the device.

Issue the following cURL request to exchange your device code for an access token. Replace `{{DEVICE_CODE}}` with the
Issue the following cURL request to exchange your device code for an access token. Replace `{{DEVICE_CODE}}` with the
device code returned from your first cURL post:

```
Expand All @@ -79,4 +79,4 @@ curl -X "POST" "http://localhost:4444/device_code.php/access_token" \
--data-urlencode "device_code={{DEVICE_CODE}}" \
--data-urlencode "client_id=myawesomeapp" \
--data-urlencode "client_secret=abc123"
```
```
2 changes: 1 addition & 1 deletion examples/public/auth_code.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use Slim\App;

$app = new App([
'settings' => [
'settings' => [
'displayErrorDetails' => true,
],
AuthorizationServer::class => function () {
Expand Down
2 changes: 1 addition & 1 deletion examples/public/client_credentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
use Slim\App;

$app = new App([
'settings' => [
'settings' => [
'displayErrorDetails' => true,
],
AuthorizationServer::class => function () {
Expand Down
2 changes: 1 addition & 1 deletion examples/public/implicit.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use Slim\App;

$app = new App([
'settings' => [
'settings' => [
'displayErrorDetails' => true,
],
AuthorizationServer::class => function () {
Expand Down
2 changes: 1 addition & 1 deletion examples/public/middleware_use.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use Slim\App;

$app = new App([
'settings' => [
'settings' => [
'displayErrorDetails' => true,
],
AuthorizationServer::class => function () {
Expand Down
2 changes: 1 addition & 1 deletion examples/public/refresh_token.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
use Slim\App;

$app = new App([
'settings' => [
'settings' => [
'displayErrorDetails' => true,
],
AuthorizationServer::class => function () {
Expand Down
6 changes: 3 additions & 3 deletions src/ResponseTypes/DeviceCodeResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public function generateHttpResponse(ResponseInterface $response): ResponseInter
$expireDateTime = $this->deviceCodeEntity->getExpiryDateTime()->getTimestamp();

$responseParams = [
'device_code' => $this->deviceCodeEntity->getIdentifier(),
'user_code' => $this->deviceCodeEntity->getUserCode(),
'device_code' => $this->deviceCodeEntity->getIdentifier(),
Sephster marked this conversation as resolved.
Show resolved Hide resolved
'user_code' => $this->deviceCodeEntity->getUserCode(),
'verification_uri' => $this->deviceCodeEntity->getVerificationUri(),
'expires_in' => $expireDateTime - time(),
'expires_in' => $expireDateTime - time(),
];

if ($this->includeVerificationUriComplete === true) {
Expand Down