first commit
This commit is contained in:
1
media/plg_multifactorauth_totp/images/totp.svg
Normal file
1
media/plg_multifactorauth_totp/images/totp.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg height="45" viewBox="0 0 113 45.000001" width="113" xmlns="http://www.w3.org/2000/svg"><g transform="matrix(.24829121 0 0 .23800411 -129.11143 -113.50479)"><path d="m523.02832 505.39047h443.94339v123.94337h-443.94339z" fill="none" stroke="#000" stroke-width="6.056613"/><text font-family="sans-serif" font-size="93.592659" letter-spacing="0" word-spacing="0" x="540.51196" y="600.6712"><tspan x="540.51196" y="600.6712">123 456</tspan></text></g></svg>
|
||||
|
After Width: | Height: | Size: 457 B |
22
media/plg_multifactorauth_totp/joomla.asset.json
Normal file
22
media/plg_multifactorauth_totp/joomla.asset.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
|
||||
"name": "plg_multifactorauth_totp",
|
||||
"version": "4.0.0",
|
||||
"description": "Time-Based One Time Password",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"assets": [
|
||||
{
|
||||
"name": "plg_multifactorauth_totp.setup",
|
||||
"type": "script",
|
||||
"uri": "plg_multifactorauth_totp/setup.min.js",
|
||||
"dependencies": [
|
||||
"qrcode",
|
||||
"core"
|
||||
],
|
||||
"attributes": {
|
||||
"type": "module"
|
||||
},
|
||||
"version": "92ad1a"
|
||||
}
|
||||
]
|
||||
}
|
||||
23
media/plg_multifactorauth_totp/js/setup.js
Normal file
23
media/plg_multifactorauth_totp/js/setup.js
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Multifactorauth.webauthn
|
||||
*
|
||||
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
((Joomla, document, qrcode) => {
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const elTarget = document.getElementById('users-mfa-totp-qrcode');
|
||||
const qrData = Joomla.getOptions('plg_multifactorauth_totp.totp.qr');
|
||||
if (!elTarget || !qrData) {
|
||||
return;
|
||||
}
|
||||
const qr = qrcode(0, 'H');
|
||||
qr.addData(qrData);
|
||||
qr.make();
|
||||
elTarget.innerHTML = qr.createImgTag(4);
|
||||
});
|
||||
// eslint-disable-next-line no-undef
|
||||
})(Joomla, document, qrcode);
|
||||
1
media/plg_multifactorauth_totp/js/setup.min.js
vendored
Normal file
1
media/plg_multifactorauth_totp/js/setup.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
((t,e,o)=>{e.addEventListener("DOMContentLoaded",(()=>{const a=e.getElementById("users-mfa-totp-qrcode"),n=t.getOptions("plg_multifactorauth_totp.totp.qr");if(!a||!n)return;const d=o(0,"H");d.addData(n),d.make(),a.innerHTML=d.createImgTag(4)}))})(Joomla,document,qrcode);
|
||||
BIN
media/plg_multifactorauth_totp/js/setup.min.js.gz
Normal file
BIN
media/plg_multifactorauth_totp/js/setup.min.js.gz
Normal file
Binary file not shown.
Reference in New Issue
Block a user