duoSecurity = $duoSecurity; $this->session = $session; } /** * @inheritdoc */ public function getJsLayout() { $this->jsLayout['components']['msp-twofactorauth-auth']['postUrl'] = $this->getUrl('*/*/authpost', ['form_key' => $this->getFormKey()]); $this->jsLayout['components']['msp-twofactorauth-auth']['signature'] = $this->duoSecurity->getRequestSignature($this->session->getUser()); $this->jsLayout['components']['msp-twofactorauth-auth']['apiHost'] = $this->duoSecurity->getApiHostname(); return parent::getJsLayout(); } }