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

Version 9 RC1 #1395

Merged
merged 187 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
3082728
change errorType to invalid_grant on invalid refresh_token
omdmhd Jul 26, 2019
4673e7d
Abstract CryptKey public methods to the CryptKeyInterface
erickskrauch Aug 17, 2019
7db4cdb
Fix CS
erickskrauch Aug 17, 2019
f604109
Update changelog
Sephster Aug 31, 2019
01d652a
Remove type hinting
Sephster Aug 31, 2019
d40a375
Add inherit docblocks to CryptKey
Sephster Aug 31, 2019
4ab302a
Fix capitalisation of inheritdoc
Sephster Aug 31, 2019
1ca1b68
Merge pull request #1044 from elyby/abstract_crypt_key
Sephster Aug 31, 2019
0b62a39
Merge remote-tracking branch 'upstream/9.0.0-WIP'
Sephster Aug 31, 2019
e33e648
Update changelog
Sephster Aug 31, 2019
0a80c19
Change HTTP status code to 400
Sephster Aug 31, 2019
5037907
Update travis to also run on version 9 branch
Sephster Aug 31, 2019
6bbedc5
Merge pull request #1042 from omdmhd/master
Sephster Aug 31, 2019
48101dd
Device Code grant
lucadegasperi Nov 25, 2019
2d3a176
removed unused method on the interface
lucadegasperi Nov 26, 2019
fb6cfd4
fixing the response
lucadegasperi Nov 26, 2019
080c37d
added verification uri
lucadegasperi Nov 26, 2019
2545475
Fix Authorship
lucadegasperi Nov 28, 2019
b5da0d2
Stycle CI fixes
lucadegasperi Nov 28, 2019
f4a8e79
phpstan fixes
lucadegasperi Nov 28, 2019
a0749a5
more phpstan fixes
lucadegasperi Nov 28, 2019
699ddae
fix
lucadegasperi Nov 28, 2019
f44acde
last fix
lucadegasperi Nov 28, 2019
5fee7e4
Update examples to include device code grant
Sephster Dec 19, 2019
925944f
Fix grant identifier in test
Sephster Dec 19, 2019
3d87496
Add device code RFC to readme
Sephster Dec 19, 2019
4270a57
Move device code specific code to grant
Sephster Dec 19, 2019
4819946
Move generateUniqueUserCode to Device Code Grant
Sephster Dec 19, 2019
a1246f2
Change user code to be alpha based
Sephster Dec 19, 2019
854849c
Add missing use statements
Sephster Dec 19, 2019
3ad3c1d
Make error message specific to device grant
Sephster Dec 19, 2019
dfde596
Fix phpstan errors
Sephster Dec 21, 2019
d3f0a79
Fix styling issues
Sephster Dec 21, 2019
71693f3
Add slow down response
Sephster Dec 23, 2019
a103953
Return invalid_grant error when the authorization code is revoked
arietimmerman Jan 27, 2020
caedd1c
Added test
arietimmerman Jan 28, 2020
f4e714e
Merge master into this branch
Sephster Jan 31, 2020
bd05611
Updating PR number
Sephster Jan 31, 2020
b75467e
Merge remote-tracking branch 'upstream/9.0.0-WIP' into feature/invali…
Sephster Jan 31, 2020
4925089
Update changelog
Sephster Jan 31, 2020
0bf21a7
Merge pull request #1082 from arietimmerman/feature/invalid_grant_whe…
Sephster Jan 31, 2020
5657640
RefreshTokenGrant calls finalizeScopes method
Feb 20, 2020
b879026
Add a hint when the user authentication fails. Fixes issue #1097
Sephster Feb 25, 2020
be7b556
Update the changelog with a placeholder
Sephster Feb 25, 2020
d8e5f06
Update pull request number
Sephster Feb 25, 2020
49f7486
Merge pull request #1098 from Sephster/add-hint-for-user-authenticati…
Sephster Feb 25, 2020
ea87e8f
Merge branch 'master' into 9.0.0-WIP
Sephster Feb 25, 2020
5247aad
Merge branch '9.0.0-WIP' of github.com:thephpleague/oauth2-server int…
Sephster Feb 25, 2020
c7c44c6
Remove hint if user credentials are incorrect
Sephster Feb 29, 2020
3fc71b8
Merge pull request #1094 from paulo-jay/RefreshTokenGrantFinalizeScopes
Sephster Mar 8, 2020
0331fbc
Update changelog
Sephster Mar 8, 2020
0a6c4f1
introduce an AuthorizationRequestInterface for the AuthorizationRequest
Apr 16, 2020
666f997
make sure we cover the setState method of the interface as well
Apr 16, 2020
2561a06
test complete authorization request with multiple request uris
Apr 16, 2020
ee20fda
Merge branch 'master' into 9.0.0-WIP
Sephster Apr 16, 2020
54e375d
Merge remote-tracking branch 'upstream/9.0.0-WIP' into authorization-…
Sephster Apr 16, 2020
f1ac1a2
Update change log
Sephster Apr 16, 2020
5d58959
Merge pull request #1110 from lordrhodos/authorization-request-interface
Sephster Apr 17, 2020
fc03e24
refactor by extracting the creation of the authorization request to a…
Apr 17, 2020
e55338b
Update changelog
Sephster Apr 18, 2020
21d1f9a
Merge pull request #1111 from lordrhodos/move-authorization-request-c…
Sephster Apr 18, 2020
ebeb0f4
Allow auth code ID to be passed to finalizeScopes. Fixes #672
Sephster Apr 18, 2020
4e0b715
Merge pull request #1112 from Sephster/pass-authcode-to-finalize-scopes
Sephster Apr 18, 2020
a2ddfdc
Add device grant middleware to slow requests
Sephster Apr 19, 2020
eba69bb
StyleCI fixes
Sephster Apr 19, 2020
7621652
StyleCI fixes
Sephster Apr 19, 2020
1c1e2cf
Update composer dependencies
Sephster Apr 19, 2020
9cb2dfe
trying to fix styleCI issue
Sephster Apr 19, 2020
df1ed20
Fix brackets formatting
Sephster Apr 19, 2020
b10cec4
Fix bug
Sephster Apr 19, 2020
8ac43b6
Fix bugs
Sephster Apr 19, 2020
13bb3c7
Merge branch 'master' into 9.0.0-WIP
Sephster Sep 30, 2020
2382db8
Update changelog
Sephster Sep 30, 2020
61d939c
Merge master into v9 wip
Sephster Dec 8, 2020
e80ac28
Readded changes for v9 to changelog
Sephster Dec 9, 2020
0ba3f42
Add redirect URI to client for RefreshToken test
Sephster Dec 9, 2020
a1fd8f0
Apply StyleCI fixes
Sephster Dec 9, 2020
46b3cb1
Merge pull request #1171 from Sephster/9.0.0-WIP
Sephster Dec 9, 2020
de61d4e
Merge master into branch
Sephster Jan 17, 2022
8618632
Update tests to only run on PHP 7.4, 8.0, and 8.1
Sephster Jan 17, 2022
9f39bf9
Update dependencies for PHP 7.4+
Sephster Jan 17, 2022
ec05e01
Add mock returns for revoke refresh token tests
Sephster Jan 17, 2022
19dc018
re-introduce phpstan
Sephster Jan 24, 2022
6844f4e
Add revokeRefreshTokens to GrantTypeInterface
Sephster Jan 29, 2022
39cca0b
change phpstan.neon.dist name
Sephster Feb 2, 2022
c15f5d9
Update phpstan default config
Sephster Feb 2, 2022
e7b4c4d
Ignore unresolvable phpstan error
Sephster Feb 22, 2022
2e9582d
Add getKeyContents() to CryptKeyInterface
Sephster Feb 22, 2022
e29a40c
Ensure UnencryptedToken is returned when parsing token
Sephster Feb 22, 2022
d32367b
Ignore unresolvable phpstan error
Sephster Feb 22, 2022
ece2df1
Revert accidental commit
Sephster Feb 22, 2022
9275867
Update phpstan ignore parameters
Sephster Feb 22, 2022
285d90c
Fix name of variable from allowedRedirectUri to allowedRedirectUris
Sephster Feb 22, 2022
89c89a9
update PHPStan level
Sephster May 4, 2022
14f5133
Fix condition that always evaluates to false
Sephster May 4, 2022
492b531
Revert type check on scopes as needlessly complicated
Sephster May 4, 2022
b5c67af
Remove always false check on state parameter
Sephster May 4, 2022
157c48a
Remove exception catches that aren't thrown
Sephster May 4, 2022
7457175
Upgrade league/event to version 3.
frankdejonge Oct 28, 2022
8fdd7af
newlines at the end of files
frankdejonge Oct 28, 2022
edd76ed
CS
frankdejonge Oct 28, 2022
269c0bb
CS
frankdejonge Oct 28, 2022
2f214a4
Add ReturnTypeWillChange to jsonSerialize
Sephster Nov 14, 2022
f4f2972
merge main into this branch
Sephster Nov 14, 2022
b3d8a74
Fix tests by reverting phpstan changes
Sephster Nov 15, 2022
f04eef8
Fix types
Sephster Nov 15, 2022
0e5d3dd
Fix PHPStan errors
Sephster Nov 15, 2022
c4f493f
Support PHPStan level 5
Sephster Nov 15, 2022
f67cfb6
Fix return types for CryptKeyTest and CryptTraitTest
Sephster Nov 15, 2022
b2e680a
Fix return types for StubResponseType
Sephster Nov 15, 2022
2d11620
Add return types for stubs/GrantType
Sephster Nov 15, 2022
b5ebfd6
Fix types for stubs/CryptTraitStub
Sephster Nov 15, 2022
840d350
Set types in stubs/ClientEntity
Sephster Nov 15, 2022
4244acc
Fix array type for PHPStan
Sephster Nov 15, 2022
ddd6a30
Add return types for tests
Sephster Nov 15, 2022
bf8b73a
Add return types for tests
Sephster Nov 15, 2022
f3007f9
Add return types for tests
Sephster Nov 15, 2022
bca5d67
Add types to satisfy phpstan
Sephster Dec 2, 2022
abe3157
Merge in master
Sephster Jun 6, 2023
cc599af
More PHPStan fixes
Sephster Jul 19, 2023
cfcdf28
Fix PHP stan issues to level 8
Sephster Jul 25, 2023
effa69a
Update to latest version of server
Sephster Jul 27, 2023
5e9444d
Update flow and tests
Sephster Aug 28, 2023
ab39ef6
Tidy up tests and add error handling
Sephster Sep 5, 2023
9433aea
Fix deprecation in PHPUnit
Sephster Sep 5, 2023
0610336
Merge master into this branch
Sephster Sep 25, 2023
2575a3e
Update comment
Sephster Sep 25, 2023
068a13e
Fix tests
Sephster Sep 27, 2023
8582e35
Fix tests
Sephster Sep 28, 2023
df850f8
Fix tests
Sephster Oct 1, 2023
9533169
PHP CS fixes
Sephster Oct 2, 2023
6720d77
Remove empty comments
Sephster Oct 2, 2023
abfa828
Fix styling
Sephster Oct 13, 2023
fac8a9b
Merge in v9 branch
Sephster Oct 17, 2023
d780f13
Update minimum PHPUnit version
Sephster Oct 17, 2023
b0528f7
Tidy up ternary operator
Sephster Oct 25, 2023
a116856
Update changelog with PR number
Sephster Oct 25, 2023
ef5ea77
Merge pull request #1375 from Sephster/php-8-1-compat
Sephster Oct 25, 2023
cd6fae1
Merge v9.0.0-WIP
Sephster Oct 25, 2023
68cf217
Add a starter PHPCS file
Sephster Oct 25, 2023
1ef803e
Merge branch '9.0.0-WIP' into feature/league-event-3
Sephster Oct 25, 2023
acef130
Fix CS issues
Sephster Oct 25, 2023
c3f91e8
Merge in v9-wip
Sephster Oct 29, 2023
b35b931
Fix merge errors
Sephster Nov 1, 2023
99835a6
Fix tests and styling
Sephster Nov 1, 2023
d7045af
Fix tests
Sephster Nov 30, 2023
4862516
Fix CS issue
Sephster Nov 30, 2023
6406b66
Merge pull request #1308 from thephpleague/feature/league-event-3
Sephster Nov 30, 2023
637fa67
Remove todo
Sephster Dec 9, 2023
9cab352
Replace __toString in access token entity with non-magic toString
Sephster Dec 9, 2023
7ff6616
Fix errors
Sephster Jan 2, 2024
5623453
Add static analysis action
Sephster Jan 7, 2024
bf58ebe
Remove dependency on league/uri v6
Sephster Jan 7, 2024
a6e767b
Add a coding standard workflow to gh actions
Sephster Jan 7, 2024
dbec4e5
Fix typo in gh action repo
Sephster Jan 7, 2024
4f85989
Install dependencies in workflow
Sephster Jan 7, 2024
1006268
Fix reference to non-existent matrix var
Sephster Jan 7, 2024
b620c43
Fix phpcs rules
Sephster Jan 7, 2024
4fe0a2c
Remove PHP 8.0 test support
Sephster Jan 7, 2024
b01e613
Update dependencies
Sephster Jan 8, 2024
c8a3493
Remove verbose mode from PHPUnit
Sephster Jan 8, 2024
f5ffc21
Remove getInvocationCount method
Sephster Jan 8, 2024
667e4c8
Revert upgrade of PHPUnit to 10.x
Sephster Jan 8, 2024
0ad7cc3
Merge v9-wip upstream branch
Sephster Jan 10, 2024
29122db
Fix composer file
Sephster Jan 10, 2024
b6e28fa
actually fix composer file
Sephster Jan 10, 2024
4aaf7aa
Fix docblock comment merge error
Sephster Jan 10, 2024
93157f4
Fix typing error
Sephster Jan 10, 2024
76cb886
Fix PHPStan errors
Sephster Jan 17, 2024
15c214d
Fix all PHPStan errors
Sephster Jan 25, 2024
4e9de6e
Support complete_verification_uri
Sephster Jan 31, 2024
0636d25
add ability to set interval
Sephster Mar 5, 2024
f8f15ef
Simplify device code response - remove payload
Sephster Mar 21, 2024
0bc83e5
Remove uuid lib
Sephster Mar 21, 2024
67284de
Fix device code examples
Sephster Mar 21, 2024
e8b5669
Remove unnecessary repository functions
Sephster Mar 21, 2024
4345dae
remove unusued import
Sephster Mar 21, 2024
2cf9fbb
Add new methods to GrantTypeInterface
Sephster Mar 21, 2024
e080cbf
Fix a test exception
Sephster Mar 21, 2024
b4fdc31
Update changelog
Sephster Mar 21, 2024
6250531
Update changelog
Sephster Mar 21, 2024
616240f
Update PHP version support
Sephster Mar 21, 2024
dde13a4
Revert docblock deletions
Sephster Mar 21, 2024
d00fbfc
Update author
Sephster Mar 21, 2024
3449fa8
Update author
Sephster Mar 21, 2024
571843d
revert erroneous edit
Sephster Mar 21, 2024
b4ca1d9
Merge pull request #1074 from lucadegasperi/device-flow-grant
Sephster Mar 21, 2024
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
36 changes: 36 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Coding Standards

on:
pull_request:
push:

jobs:
coding-standards:
name: Coding Standards

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
php-version:
- 8.3
operating-system:
- ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

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

- name: Run Codesniffer
run: vendor/bin/phpcs
37 changes: 37 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Static Analysis

on:
push:
pull_request:

jobs:
static-analysis:
name: Static Analysis

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
php-version: [8.1, 8.2, 8.3]
composer-stability: [prefer-lowest, prefer-stable]
operating-system:
- ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Install Dependencies
run: composer update --${{ matrix.composer-stability }} --prefer-dist --no-interaction --no-progress

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

11 changes: 2 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,9 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2]
php: [8.1, 8.2, 8.3]
os: [ubuntu-22.04]
stability: [prefer-lowest, prefer-stable]
include:
- os: ubuntu-20.04
php: 8.0
stability: prefer-lowest
- os: ubuntu-20.04
php: 8.0
stability: prefer-stable

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -48,7 +41,7 @@ jobs:
composer global require scrutinizer/ocular

- name: Execute tests
run: vendor/bin/phpunit --verbose --coverage-clover=coverage.clover
run: vendor/bin/phpunit --coverage-clover=coverage.clover

- name: Code coverage
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'thephpleague/oauth2-server' }}
Expand Down
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Device Authorization Grant added (PR #1074)
- GrantTypeInterface has a new function, `revokeRefreshTokens()` for enabling or disabling refresh tokens after use (PR #1375)
- A CryptKeyInterface to allow developers to change the CryptKey implementation with greater ease (PR #1044)
- The authorization server can now finalize scopes when a client uses a refresh token (PR #1094)
- An AuthorizationRequestInterface to make it easier to extend the AuthorizationRequest (PR #1110)
- Added function `getKeyContents()` to the `CryptKeyInterface` (PR #1375)

### Fixed
- If a refresh token has expired, been revoked, cannot be decrypted, or does not belong to the correct client, the server will now issue an `invalid_grant` error and a HTTP 400 response. In previous versions the server incorrectly issued an `invalid_request` and HTTP 401 response (PR #1042) (PR #1082)

### Changed
- Authorization Request objects are now created through the factory method, `createAuthorizationRequest()` (PR #1111)
- Changed parameters for `finalizeScopes()` to allow a reference to an auth code ID (PR #1112)
- AccessTokenEntityInterface now requires the implementation of `toString()` instead of the magic method `__toString()` (PR #XXXX)

### Removed
- Removed message property from OAuthException HTTP response. Now just use error_description as per the OAuth 2 spec (PR #1375)

## [8.5.4] - released 2023-08-25
### Added
Expand Down Expand Up @@ -119,7 +137,6 @@ a PKCE downgrade attack (PR #1326)
- 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

### Added
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,29 @@
Out of the box it supports the following grants:

* Authorization code grant
* Implicit grant
* Client credentials grant
* Resource owner password credentials grant
* Device authorization grant
* Implicit grant
* Refresh grant
* Resource owner password credentials grant

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)
* [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)

This library was created by Alex Bilbie. Find him on Twitter at [@alexbilbie](https://twitter.com/alexbilbie).

## Requirements

The latest version of this package supports the following versions of PHP:

* PHP 8.0
* PHP 8.1
* PHP 8.2
* PHP 8.3

The `openssl` and `json` extensions are also required.

Expand Down
39 changes: 27 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,29 @@
"homepage": "https://oauth2.thephpleague.com/",
"license": "MIT",
"require": {
"php": "^8.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-openssl": "*",
"league/event": "^2.2",
"league/uri": "^6.7 || ^7.0",
"lcobucci/jwt": "^4.3 || ^5.0",
"psr/http-message": "^1.0.1 || ^2.0",
"defuse/php-encryption": "^2.3",
"lcobucci/clock": "^2.2 || ^3.0"
"league/event": "^3.0",
"league/uri": "^7.0",
"lcobucci/jwt": "^5.0",
"psr/http-message": "^2.0",
"defuse/php-encryption": "^2.4",
"ext-json": "*",
"lcobucci/clock": "^2.3 || ^3.0",
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.6.6",
"laminas/laminas-diactoros": "^3.0.0",
"phpstan/phpstan": "^0.12.57",
"phpstan/phpstan-phpunit": "^0.12.16",
"roave/security-advisories": "dev-master"
"phpunit/phpunit": "^9.6.15",
"laminas/laminas-diactoros": "^3.3.0",
"phpstan/phpstan": "^1.10.55",
"phpstan/phpstan-phpunit": "^1.3.15",
"roave/security-advisories": "dev-master",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan-deprecation-rules": "^1.1.4",
"phpstan/phpstan-strict-rules": "^1.5.2",
"slevomat/coding-standard": "^8.14.1",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"squizlabs/php_codesniffer": "^3.8"
},
"repositories": [
{
Expand Down Expand Up @@ -69,5 +77,12 @@
"psr-4": {
"LeagueTests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"ocramius/package-versions": true,
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": false
}
}
}
29 changes: 29 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,32 @@ curl -X "POST" "http://localhost:4444/refresh_token.php/access_token" \
--data-urlencode "client_secret=abc123" \
--data-urlencode "refresh_token={{REFRESH_TOKEN}}"
```

## Testing the device authorization grant example

Send the following cURL request. This will return a device code which can be exchanged for an access token.

```
curl -X "POST" "http://localhost:4444/device_code.php/device_authorization" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: 1.0" \
--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
device code returned from your first cURL post:

```
curl -X "POST" "http://localhost:4444/device_code.php/access_token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: 1.0" \
--data-urlencode "grant_type=urn:ietf:params:oauth:grant-type:device_code" \
--data-urlencode "device_code={{DEVICE_CODE}}" \
--data-urlencode "client_id=myawesomeapp" \
--data-urlencode "client_secret=abc123"
```
2 changes: 1 addition & 1 deletion examples/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"slim/slim": "^3.12.3"
},
"require-dev": {
"league/event": "^2.2",
"league/event": "^3.0",
"lcobucci/jwt": "^3.4.6 || ^4.0.4",
"psr/http-message": "^1.0.1",
"defuse/php-encryption": "^2.2.1",
Expand Down
Loading
Loading