File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ public function main(Request $request): Response
183183 });
184184 } else {
185185 if ($ state ['FIDO2WantsRegister ' ]) {
186- $ response = new RedirectResponse (Module::getModuleURL ('webauthn.php /webauthn?StateId= ' . urlencode ($ stateId )));
186+ $ response = new RedirectResponse (Module::getModuleURL ('webauthn/webauthn.php ?StateId= ' . urlencode ($ stateId )));
187187 } else {
188188 $ response = new RunnableResponse ([Auth \ProcessingChain::class, 'resumeProcessing ' ], [$ state ]);
189189 }
Original file line number Diff line number Diff line change @@ -97,8 +97,10 @@ public function main(Request $request): Template
9797 /** @var array $state */
9898 $ state = $ this ->authState ::loadState ($ stateId , 'webauthn:request ' );
9999
100+ $ templateFile = $ state ['UseInflowRegistration ' ] ? 'webauthn:webauthn.tpl.php ' : 'webauthn:authentication.tpl.php ' ;
101+
100102 // Make, populate and layout consent form
101- $ t = new Template ($ this ->config , ' webauthn:authentication.tpl.php ' );
103+ $ t = new Template ($ this ->config , $ templateFile );
102104 $ t ->data ['UserID ' ] = $ state ['FIDO2Username ' ];
103105 $ t ->data ['FIDO2Tokens ' ] = $ state ['FIDO2Tokens ' ];
104106
@@ -143,11 +145,11 @@ public function main(Request $request): Template
143145
144146 $ t ->data ['FIDO2AuthSuccessful ' ] = $ state ['FIDO2AuthSuccessful ' ];
145147 if (
146- count ($ state ['FIDO2Tokens ' ]) == 0 ||
148+ count ($ state ['FIDO2Tokens ' ]) === 0 ||
147149 ($ state ['FIDO2WantsRegister ' ] === true && $ state ['FIDO2AuthSuccessful ' ] !== false )
148150 ) {
149- $ t ->data ['regURL ' ] = Module::getModuleURL ('webauthn.php /regprocess?StateId= ' . urlencode ($ stateId ));
150- $ t ->data ['delURL ' ] = Module::getModuleURL ('webauthn.php /managetoken?StateId= ' . urlencode ($ stateId ));
151+ $ t ->data ['regURL ' ] = Module::getModuleURL ('webauthn/regprocess.php ?StateId= ' . urlencode ($ stateId ));
152+ $ t ->data ['delURL ' ] = Module::getModuleURL ('webauthn/managetoken.php ?StateId= ' . urlencode ($ stateId ));
151153 }
152154
153155 $ t ->data ['authForm ' ] = "" ;
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ public function testWebAuthn(): void
7979 public static function loadState ($ id , $ stage , $ allowMissing = false )
8080 {
8181 return [
82+ 'UseInflowRegistration ' => true ,
8283 'FIDO2Displayname ' => 'Donald Duck ' ,
8384 'FIDO2Username ' => 'dduck ' ,
8485 'FIDO2Scope ' => 'Ducktown ' ,
You can’t perform that action at this time.
0 commit comments