We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In doc:
<?php namespace app\storage; class PublicKeyStorage implements \OAuth2\Storage\PublicKeyInterface{ private $pbk = null; private $pvk = null; public function __construct() { $this->pvk = file_get_contents('privkey.pem', true); $this->pbk = file_get_contents('pubkey.pem', true); } public function getPublicKey($client_id = null){ return $this->pbk; } public function getPrivateKey($client_id = null){ return $this->pvk; } public function getEncryptionAlgorithm($client_id = null){ return 'RS256'; } }
Then , I wrote this action in a controller:
class OpenIdController extends BaseRestController { /** * @throws InvalidConfigException */ public function actionPublicKey() { /** @var Module $module */ $module = Yii::$app->getModule('oauth2'); die(Html::tag('pre', VarDumper::dumpAsString($module->getServer()->getStorage('public_key')->someWhat ? ))); }
Thanks
The text was updated successfully, but these errors were encountered:
#SOLVED
/** * @throws InvalidConfigException */ public function actionPublicKey() { /** @var Module $module */ $module = Yii::$app->getModule('oauth2'); return $module->getServer() ->getStorage('public_key') ->getPublicKey('some-client-id'); } ```
Sorry, something went wrong.
No branches or pull requests
In doc:
Then , I wrote this action in a controller:
Thanks
The text was updated successfully, but these errors were encountered: