log communication in debug mode
Cette révision appartient à :
Parent
9164e1f754
révision
ccf091a7e3
|
@ -100,6 +100,7 @@ class d3user_webauthn extends AdminDetailsController
|
||||||
try {
|
try {
|
||||||
$error = Registry::getRequest()->getRequestEscapedParameter('error');
|
$error = Registry::getRequest()->getRequestEscapedParameter('error');
|
||||||
if (strlen((string) $error)) {
|
if (strlen((string) $error)) {
|
||||||
|
d3GetOxidDIC()->get('d3ox.webauthn.'.LoggerInterface::class)->debug($error);
|
||||||
/** @var WebauthnCreateException $e */
|
/** @var WebauthnCreateException $e */
|
||||||
$e = oxNew(WebauthnCreateException::class, $error);
|
$e = oxNew(WebauthnCreateException::class, $error);
|
||||||
throw $e;
|
throw $e;
|
||||||
|
@ -107,6 +108,7 @@ class d3user_webauthn extends AdminDetailsController
|
||||||
|
|
||||||
$credential = Registry::getRequest()->getRequestEscapedParameter('credential');
|
$credential = Registry::getRequest()->getRequestEscapedParameter('credential');
|
||||||
if (strlen((string) $credential)) {
|
if (strlen((string) $credential)) {
|
||||||
|
d3GetOxidDIC()->get('d3ox.webauthn.'.LoggerInterface::class)->debug($credential);
|
||||||
/** @var Webauthn $webauthn */
|
/** @var Webauthn $webauthn */
|
||||||
$webauthn = d3GetOxidDIC()->get(Webauthn::class);
|
$webauthn = d3GetOxidDIC()->get(Webauthn::class);
|
||||||
$webauthn->saveAuthn($credential, Registry::getRequest()->getRequestEscapedParameter('keyname'));
|
$webauthn->saveAuthn($credential, Registry::getRequest()->getRequestEscapedParameter('keyname'));
|
||||||
|
|
|
@ -26,6 +26,7 @@ use Doctrine\DBAL\Driver\Exception as DoctrineDriverException;
|
||||||
use Doctrine\DBAL\Exception as DoctrineException;
|
use Doctrine\DBAL\Exception as DoctrineException;
|
||||||
use OxidEsales\Eshop\Application\Controller\Admin\AdminController;
|
use OxidEsales\Eshop\Application\Controller\Admin\AdminController;
|
||||||
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
||||||
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use OxidEsales\Eshop\Core\Request;
|
use OxidEsales\Eshop\Core\Request;
|
||||||
use OxidEsales\Eshop\Core\Routing\ControllerClassNameResolver;
|
use OxidEsales\Eshop\Core\Routing\ControllerClassNameResolver;
|
||||||
use OxidEsales\Eshop\Core\Session;
|
use OxidEsales\Eshop\Core\Session;
|
||||||
|
@ -101,6 +102,7 @@ class d3webauthnadminlogin extends AdminController
|
||||||
$publicKeyCredentialRequestOptions = $webauthn->getRequestOptions($userId);
|
$publicKeyCredentialRequestOptions = $webauthn->getRequestOptions($userId);
|
||||||
d3GetOxidDIC()->get('d3ox.webauthn.'.Session::class)
|
d3GetOxidDIC()->get('d3ox.webauthn.'.Session::class)
|
||||||
->setVariable(WebauthnConf::WEBAUTHN_ADMIN_LOGIN_OBJECT, $publicKeyCredentialRequestOptions);
|
->setVariable(WebauthnConf::WEBAUTHN_ADMIN_LOGIN_OBJECT, $publicKeyCredentialRequestOptions);
|
||||||
|
d3GetOxidDIC()->get('d3ox.webauthn.'.LoggerInterface::class)->debug($publicKeyCredentialRequestOptions);
|
||||||
$this->addTplParam('webauthn_publickey_login', $publicKeyCredentialRequestOptions);
|
$this->addTplParam('webauthn_publickey_login', $publicKeyCredentialRequestOptions);
|
||||||
$this->addTplParam('isAdmin', isAdmin());
|
$this->addTplParam('isAdmin', isAdmin());
|
||||||
} catch (WebauthnException $e) {
|
} catch (WebauthnException $e) {
|
||||||
|
|
|
@ -110,6 +110,8 @@ class d3_account_webauthn extends AccountController
|
||||||
$publicKeyCredentialCreationOptions = d3GetOxidDIC()->get(Webauthn::class)
|
$publicKeyCredentialCreationOptions = d3GetOxidDIC()->get(Webauthn::class)
|
||||||
->getCreationOptions($this->getUser());
|
->getCreationOptions($this->getUser());
|
||||||
|
|
||||||
|
d3GetOxidDIC()->get('d3ox.webauthn.'.LoggerInterface::class)->debug((string) $publicKeyCredentialCreationOptions);
|
||||||
|
|
||||||
$this->addTplParam('webauthn_publickey_create', $publicKeyCredentialCreationOptions);
|
$this->addTplParam('webauthn_publickey_create', $publicKeyCredentialCreationOptions);
|
||||||
$this->addTplParam('isAdmin', isAdmin());
|
$this->addTplParam('isAdmin', isAdmin());
|
||||||
$this->addTplParam('keyname', Registry::getRequest()->getRequestEscapedParameter('credenialname'));
|
$this->addTplParam('keyname', Registry::getRequest()->getRequestEscapedParameter('credenialname'));
|
||||||
|
@ -127,8 +129,8 @@ class d3_account_webauthn extends AccountController
|
||||||
/** @var Request $request */
|
/** @var Request $request */
|
||||||
$request = d3GetOxidDIC()->get('d3ox.webauthn.'.Request::class);
|
$request = d3GetOxidDIC()->get('d3ox.webauthn.'.Request::class);
|
||||||
$error = $request->getRequestEscapedParameter('error');
|
$error = $request->getRequestEscapedParameter('error');
|
||||||
|
|
||||||
if (strlen((string) $error)) {
|
if (strlen((string) $error)) {
|
||||||
|
d3GetOxidDIC()->get('d3ox.webauthn.'.LoggerInterface::class)->debug($error);
|
||||||
/** @var WebauthnCreateException $e */
|
/** @var WebauthnCreateException $e */
|
||||||
$e = oxNew(WebauthnCreateException::class, $error);
|
$e = oxNew(WebauthnCreateException::class, $error);
|
||||||
throw $e;
|
throw $e;
|
||||||
|
@ -136,6 +138,7 @@ class d3_account_webauthn extends AccountController
|
||||||
|
|
||||||
$credential = d3GetOxidDIC()->get('d3ox.webauthn.'.Request::class)->getRequestEscapedParameter('credential');
|
$credential = d3GetOxidDIC()->get('d3ox.webauthn.'.Request::class)->getRequestEscapedParameter('credential');
|
||||||
if (strlen((string) $credential)) {
|
if (strlen((string) $credential)) {
|
||||||
|
d3GetOxidDIC()->get('d3ox.webauthn.'.LoggerInterface::class)->debug($credential);
|
||||||
$webauthn = d3GetOxidDIC()->get(Webauthn::class);
|
$webauthn = d3GetOxidDIC()->get(Webauthn::class);
|
||||||
$webauthn->saveAuthn($credential, d3GetOxidDIC()->get('d3ox.webauthn.'.Request::class)->getRequestEscapedParameter('keyname'));
|
$webauthn->saveAuthn($credential, d3GetOxidDIC()->get('d3ox.webauthn.'.Request::class)->getRequestEscapedParameter('keyname'));
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,7 @@ class d3webauthnlogin extends FrontendController
|
||||||
/** @var Webauthn $webauthn */
|
/** @var Webauthn $webauthn */
|
||||||
$webauthn = d3GetOxidDIC()->get(Webauthn::class);
|
$webauthn = d3GetOxidDIC()->get(Webauthn::class);
|
||||||
$publicKeyCredentialRequestOptions = $webauthn->getRequestOptions($userId);
|
$publicKeyCredentialRequestOptions = $webauthn->getRequestOptions($userId);
|
||||||
|
d3GetOxidDIC()->get('d3ox.webauthn.'.LoggerInterface::class)->debug($publicKeyCredentialRequestOptions);
|
||||||
$this->addTplParam('webauthn_publickey_login', $publicKeyCredentialRequestOptions);
|
$this->addTplParam('webauthn_publickey_login', $publicKeyCredentialRequestOptions);
|
||||||
$this->addTplParam('isAdmin', isAdmin());
|
$this->addTplParam('isAdmin', isAdmin());
|
||||||
} catch (WebauthnException $e) {
|
} catch (WebauthnException $e) {
|
||||||
|
|
Chargement…
Référencer dans un nouveau ticket