Skip to content

Commit eeecb0f

Browse files
author
Ilya Sakovich
authored
Merge pull request #18 from ankurk91/patch/passport-8
Passport v8 support
2 parents 44d8bae + a06ece7 commit eeecb0f

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor
2-
composer.lock
2+
composer.lock
3+
.phpunit.result.cache

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"require": {
1414
"php": ">=7.1",
15-
"laravel/passport": "^6.0|^7.0"
15+
"laravel/passport": "^6.0|^7.0|^8.0"
1616
},
1717
"require-dev": {
1818
"mockery/mockery": "^1.1",

tests/SocialGrantTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Coderello\SocialGrant\Tests;
44

5+
use League\OAuth2\Server\CryptKey;
56
use Zend\Diactoros\ServerRequest;
67
use Coderello\SocialGrant\Tests\Stubs\User;
78
use League\OAuth2\Server\Exception\OAuthServerException;
@@ -62,6 +63,7 @@ public function test_respond_to_request()
6263
$grant->setAccessTokenRepository($accessTokenRepositoryMock);
6364
$grant->setScopeRepository($scopeRepositoryMock);
6465
$grant->setDefaultScope(self::DEFAULT_SCOPE);
66+
$grant->setPrivateKey(new CryptKey('file://'.__DIR__.'/Stubs/private.key', null, false));
6567

6668
$serverRequest = new ServerRequest();
6769
$serverRequest = $serverRequest->withParsedBody(

tests/Stubs/private.key

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
-----BEGIN RSA PRIVATE KEY-----
2+
MIICXgIBAAKBgQDOBcFjGUlo3BJ9zjwQLgAHn6Oy5Si0uB7MublTiPob8rWTiCE4
3+
weAFqzPoAB07vB0t0f8c1R8rmwHMD5ljWPBgJ8FewtwAUzprOBcau6DWukd/TKxX
4+
WeVLAl/NZxijI+jR5QDBYLNBtj1G4LBVHMmINd3ryCycbf9ac3rcC8zhrQIDAQAB
5+
AoGADfOJ0wIlXHp6rhZHLvlOezWuSjEGfqZxP3/cMvH1rerTrPfs+AD5AKlFTJKl
6+
aCQm/bFYy0ULZVKL3pu30Wh2bo1nh/wLuLSI9Nz3O8jqAP3z0i07SoRoQmb8fRnn
7+
dwoDFqnk3uGqcOenheSqheIgl9vdW/3avhD6nkMKZGxPYwECQQDoSj/xHogEzMqB
8+
1Z2E5H/exeE9GQ7+dGITRR2MSgo9WvcKdRhGaQ44dsnTmqiZWAfqAPJjTQIIA/Cn
9+
YRRTeBbNAkEA4w0iEvCIygGQOAnWuvVzlh+pxIB+BTeGkbiBG7nkYYc9b6B/Tw1B
10+
GWGRddBr/FIfPvy1X2ip/TBpH+9bHnE2YQJBAIbZw/EYhmIy+UUSW9WwSUNsoOu1
11+
Rm0V53HEZ/jvaq5fxpa9j5AgoO7KlzROzp3m6wE/93cKV6mLkAO7ae9jAekCQQCf
12+
B6DZIS6+RrAMACAt3SOzf8P6BYG/B7Ayusd7cw2ang4S9JiW9xKkw2kN2wj3t1F5
13+
XalwBTAjTdgj7ROmU+ehAkEAkOyXKONGBoVfaixRHgBP6jIBSSPbB2Aosi0QAURX
14+
6GOY7wOS1pCSntTOBQxV7wVjqFwYAR10MSxFSNfpJ7RkzA==
15+
-----END RSA PRIVATE KEY-----

0 commit comments

Comments
 (0)