File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
- # Example implementations
1
+ # Example implementations (via [ ` Slim 3 ` ] ( https://github.com/slimphp/Slim/tree/3.x ) )
2
2
3
3
## Installation
4
4
5
5
0 . Run ` composer install ` in this directory to install dependencies
6
6
0 . Create a private key ` openssl genrsa -out private.key 2048 `
7
- 0 . Create a public key ` openssl rsa -in private.key -pubout > public.key `
8
- 0 . ` cd ` into the public directory
9
- 0 . Start a PHP server ` php -S localhost:4444 `
7
+ 0 . Export the public key ` openssl rsa -in private.key -pubout > public.key `
8
+ 0 . Start local PHP server ` php -S 127.0.0.1:4444 -t public/ `
10
9
11
10
## Testing the client credentials grant example
12
11
Original file line number Diff line number Diff line change @@ -21,31 +21,31 @@ class AuthCodeRepository implements AuthCodeRepositoryInterface
21
21
/**
22
22
* {@inheritdoc}
23
23
*/
24
- public function persistNewAuthCode (AuthCodeEntityInterface $ authCodeEntity )
24
+ public function persistNewAuthCode (AuthCodeEntityInterface $ authCodeEntity ): void
25
25
{
26
26
// Some logic to persist the auth code to a database
27
27
}
28
28
29
29
/**
30
30
* {@inheritdoc}
31
31
*/
32
- public function revokeAuthCode ($ codeId )
32
+ public function revokeAuthCode ($ codeId ): void
33
33
{
34
34
// Some logic to revoke the auth code in a database
35
35
}
36
36
37
37
/**
38
38
* {@inheritdoc}
39
39
*/
40
- public function isAuthCodeRevoked ($ codeId )
40
+ public function isAuthCodeRevoked ($ codeId ): bool
41
41
{
42
42
return false ; // The auth code has not been revoked
43
43
}
44
44
45
45
/**
46
46
* {@inheritdoc}
47
47
*/
48
- public function getNewAuthCode ()
48
+ public function getNewAuthCode (): AuthCodeEntityInterface
49
49
{
50
50
return new AuthCodeEntity ();
51
51
}
You can’t perform that action at this time.
0 commit comments