|
@@ -97,7 +97,7 @@ discard block |
|
|
block discarded – undo |
|
97
|
97
|
/** @var array $state */ |
|
98
|
98
|
$state = $this->authState::loadState($stateId, 'webauthn:request'); |
|
99
|
99
|
|
|
100
|
|
- $templateFile = ( $state['UseInflowRegistration'] || $state['InRegistration'] ) ? 'webauthn:webauthn.twig' : 'webauthn:authentication.twig'; |
|
|
100
|
+ $templateFile = ($state['UseInflowRegistration'] || $state['InRegistration']) ? 'webauthn:webauthn.twig' : 'webauthn:authentication.twig'; |
|
101
|
101
|
|
|
102
|
102
|
// Make, populate and layout consent form |
|
103
|
103
|
$t = new Template($this->config, $templateFile); |
|
@@ -134,7 +134,7 @@ discard block |
|
|
block discarded – undo |
|
134
|
134
|
$frontendData = []; |
|
135
|
135
|
$frontendData['challengeEncoded'] = $challengeEncoded; |
|
136
|
136
|
$frontendData['state'] = []; |
|
137
|
|
- foreach (['Source', 'FIDO2Scope','FIDO2Username','FIDO2Displayname','requestTokenModel'] as $stateItem) { |
|
|
137
|
+ foreach (['Source', 'FIDO2Scope', 'FIDO2Username', 'FIDO2Displayname', 'requestTokenModel'] as $stateItem) { |
|
138
|
138
|
$frontendData['state'][$stateItem] = $state[$stateItem]; |
|
139
|
139
|
} |
|
140
|
140
|
|
|
@@ -147,7 +147,7 @@ discard block |
|
|
block discarded – undo |
|
147
|
147
|
$t->data['FIDO2AuthSuccessful'] = $state['FIDO2AuthSuccessful']; |
|
148
|
148
|
if ( |
|
149
|
149
|
count($state['FIDO2Tokens']) === 0 || // no tokens |
|
150
|
|
- ($state['FIDO2WantsRegister'] === true && $state['FIDO2AuthSuccessful'] !== false ) || // authenticated and wants to change something |
|
|
150
|
+ ($state['FIDO2WantsRegister'] === true && $state['FIDO2AuthSuccessful'] !== false) || // authenticated and wants to change something |
|
151
|
151
|
$state['UseInflowRegistration'] !== true // stand-alone registration active - can change without being authenticated with second factor |
|
152
|
152
|
) { |
|
153
|
153
|
$t->data['regURL'] = Module::getModuleURL('webauthn/regprocess?StateId=' . urlencode($stateId)); |