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 ) )
22
33## Installation
44
550 . Run ` composer install ` in this directory to install dependencies
660 . 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/ `
109
1110## Testing the client credentials grant example
1211
Original file line number Diff line number Diff line change @@ -21,31 +21,31 @@ class AuthCodeRepository implements AuthCodeRepositoryInterface
2121 /**
2222 * {@inheritdoc}
2323 */
24- public function persistNewAuthCode (AuthCodeEntityInterface $ authCodeEntity )
24+ public function persistNewAuthCode (AuthCodeEntityInterface $ authCodeEntity ): void
2525 {
2626 // Some logic to persist the auth code to a database
2727 }
2828
2929 /**
3030 * {@inheritdoc}
3131 */
32- public function revokeAuthCode ($ codeId )
32+ public function revokeAuthCode ($ codeId ): void
3333 {
3434 // Some logic to revoke the auth code in a database
3535 }
3636
3737 /**
3838 * {@inheritdoc}
3939 */
40- public function isAuthCodeRevoked ($ codeId )
40+ public function isAuthCodeRevoked ($ codeId ): bool
4141 {
4242 return false ; // The auth code has not been revoked
4343 }
4444
4545 /**
4646 * {@inheritdoc}
4747 */
48- public function getNewAuthCode ()
48+ public function getNewAuthCode (): AuthCodeEntityInterface
4949 {
5050 return new AuthCodeEntity ();
5151 }
You can’t perform that action at this time.
0 commit comments