Skip to content

Commit 956b6c9

Browse files
committed
Restore php template for oldUI
1 parent 2aa04c5 commit 956b6c9

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

templates/authentication.tpl.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php $this->data['pagetitle'] = $this->t('{webauthn:webauthn:page_title}'); ?>
2+
3+
<?php ob_start(); ?>
4+
<link rel="stylesheet" type="text/css" href="<?php echo htmlspecialchars(SimpleSAML\Module::getModuleUrl('webauthn/')); ?>assets/css/webauthn.css" />
5+
<meta name="frontendData" id="frontendData" content="<?php echo htmlspecialchars($this->data['frontendData']); ?>" />
6+
<?php $html = ob_get_contents(); ob_end_clean(); $this->data['head'] = $html; ?>
7+
<?php $this->includeAtTemplateBase('includes/header.php'); ?>
8+
9+
<h1><?php echo htmlspecialchars($this->t('{webauthn:webauthn:heading1}')); ?></h1>
10+
<?php if((isset($this->data['authURL'])?((is_array($this->data['authURL']) || $this->data['authURL'] instanceof Countable)?count($this->data['authURL']):strlen($this->data['authURL'])):0) > 0): ?>
11+
<form id='authform' method='POST' action='<?php echo $this->data['authURL']; ?>'>
12+
<input type='hidden' id='resp' name='response_id' value='0'/>
13+
<input type='hidden' id='data' name='attestation_client_data_json' value='nix'/>
14+
<input type='hidden' id='authdata' name='authenticator_data' value='mehrnix'/>
15+
<input type='hidden' id='sigdata' name='signature' value='evenmorenix'/>
16+
<input type='hidden' id='data_raw_b64' name='client_data_raw' value='garnix'/>
17+
<input type='hidden' id='type' name='type' value='something'/>
18+
<input type='hidden' id='operation' name='operation' value='AUTH'/>
19+
<button type='button' id='authformSubmit'><?php echo htmlspecialchars($this->t('{webauthn:webauthn:authTokenButton}')); ?></button>
20+
</form>
21+
<?php endif; ?>
22+
<script src="<?php echo htmlspecialchars(SimpleSAML\Module::getModuleUrl('webauthn/')); ?>assets/js/webauthn.js"></script>
23+
<script src="<?php echo htmlspecialchars(SimpleSAML\Module::getModuleUrl('webauthn/')); ?>assets/js/authentication.js"></script>
24+
25+
<?php $this->includeAtTemplateBase('includes/footer.php'); ?>

www/webauthn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/** @var array $state */
3131
$state = Auth\State::loadState($id, 'webauthn:request');
3232

33-
$templateFile = $state['UseInflowRegistration'] ? 'webauthn:webauthn.php' : 'webauthn:authentication.twig';
33+
$templateFile = $state['UseInflowRegistration'] ? 'webauthn:webauthn.tpl.php' : 'webauthn:authentication.tpl.php';
3434

3535
// Make, populate and layout consent form
3636
$t = new Template($globalConfig, $templateFile);

0 commit comments

Comments
 (0)