Skip to content

Commit 2824f7d

Browse files
committed
Fixed examples
1 parent 0a6a4de commit 2824f7d

6 files changed

Lines changed: 6 additions & 16 deletions

File tree

examples/public/auth_code.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,15 @@
3636
$refreshTokenRepository = new RefreshTokenRepository();
3737

3838
$privateKeyPath = 'file://' . __DIR__ . '/../private.key';
39-
$publicKeyPath = 'file://' . __DIR__ . '/../public.key';
4039

4140
// Setup the authorization server
4241
$server = new AuthorizationServer(
4342
$clientRepository,
4443
$accessTokenRepository,
4544
$scopeRepository,
4645
$privateKeyPath,
47-
$publicKeyPath
46+
'lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen'
4847
);
49-
$server->setEncryptionKey('lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen');
5048

5149
// Enable the authentication code grant on the server with a token TTL of 1 hour
5250
$server->enableGrantType(

examples/public/client_credentials.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,15 @@
3232
// Path to public and private keys
3333
$privateKey = 'file://' . __DIR__ . '/../private.key';
3434
//$privateKey = new CryptKey('file://path/to/private.key', 'passphrase'); // if private key has a pass phrase
35-
$publicKey = 'file://' . __DIR__ . '/../public.key';
3635

3736
// Setup the authorization server
3837
$server = new AuthorizationServer(
3938
$clientRepository,
4039
$accessTokenRepository,
4140
$scopeRepository,
4241
$privateKey,
43-
$publicKey
42+
'lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen'
4443
);
45-
$server->setEncryptionKey('lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen');
4644

4745
// Enable the client credentials grant on the server
4846
$server->enableGrantType(

examples/public/implicit.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@
3232
$accessTokenRepository = new AccessTokenRepository();
3333

3434
$privateKeyPath = 'file://' . __DIR__ . '/../private.key';
35-
$publicKeyPath = 'file://' . __DIR__ . '/../public.key';
3635

3736
// Setup the authorization server
3837
$server = new AuthorizationServer(
3938
$clientRepository,
4039
$accessTokenRepository,
4140
$scopeRepository,
4241
$privateKeyPath,
43-
$publicKeyPath
42+
'lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen'
4443
);
4544
$server->setEncryptionKey('lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen');
4645

examples/public/middleware_use.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,15 @@
3838
$refreshTokenRepository = new RefreshTokenRepository();
3939

4040
$privateKeyPath = 'file://' . __DIR__ . '/../private.key';
41-
$publicKeyPath = 'file://' . __DIR__ . '/../public.key';
4241

4342
// Setup the authorization server
4443
$server = new AuthorizationServer(
4544
$clientRepository,
4645
$accessTokenRepository,
4746
$scopeRepository,
4847
$privateKeyPath,
49-
$publicKeyPath
48+
'lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen'
5049
);
51-
$server->setEncryptionKey('lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen');
5250

5351
// Enable the authentication code grant on the server with a token TTL of 1 hour
5452
$server->enableGrantType(

examples/public/password.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
new AccessTokenRepository(), // instance of AccessTokenRepositoryInterface
2525
new ScopeRepository(), // instance of ScopeRepositoryInterface
2626
'file://' . __DIR__ . '/../private.key', // path to private key
27-
'file://' . __DIR__ . '/../public.key' // path to public key
27+
'lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen' // encryption key
2828
);
29-
$server->setEncryptionKey('lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen');
3029

3130
$grant = new PasswordGrant(
3231
new UserRepository(), // instance of UserRepositoryInterface

examples/public/refresh_token.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,15 @@
3232
$refreshTokenRepository = new RefreshTokenRepository();
3333

3434
$privateKeyPath = 'file://' . __DIR__ . '/../private.key';
35-
$publicKeyPath = 'file://' . __DIR__ . '/../public.key';
3635

3736
// Setup the authorization server
3837
$server = new AuthorizationServer(
3938
$clientRepository,
4039
$accessTokenRepository,
4140
$scopeRepository,
4241
$privateKeyPath,
43-
$publicKeyPath
42+
'lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen'
4443
);
45-
$server->setEncryptionKey('lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen');
4644

4745
// Enable the refresh token grant on the server
4846
$grant = new RefreshTokenGrant($refreshTokenRepository);

0 commit comments

Comments
 (0)