PDF rausgenommen
This commit is contained in:
@ -0,0 +1,76 @@
|
||||
<div ng-controller="SetupTwoFactorAuthController as setup2fa" class="setupTwoFactorAuthentication">
|
||||
{% if isAlreadyUsing2fa %}
|
||||
<div class="alert alert-warning">{{ 'TwoFactorAuth_WarningChangingConfiguredDevice'|translate }}</div>
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
{{ 'TwoFactorAuth_SetupIntroFollowSteps'|translate }}
|
||||
</p>
|
||||
|
||||
<h2>
|
||||
{{ 'TwoFactorAuth_StepX'|translate(1) }} - {{ 'TwoFactorAuth_RecoveryCodes'|translate }}
|
||||
</h2>
|
||||
{% include '@TwoFactorAuth/_showRecoveryCodes.twig' %}
|
||||
|
||||
<div class="alert alert-info backupRecoveryCodesAlert" ng-show="setup2fa.step == 1">{{ 'TwoFactorAuth_SetupBackupRecoveryCodes'|translate }}</div>
|
||||
|
||||
<p><button ng-click="setup2fa.nextStep()" ng-show="setup2fa.step == 1" ng-disabled="!setup2fa.hasDownloadedRecoveryCode" class="btn goToStep2">{{ 'General_Next'|translate }}</button></p>
|
||||
|
||||
<a name="twoFactorStep2" id="twoFactorStep2" style="opacity: 0"></a>
|
||||
<div ng-show="setup2fa.step >= 2">
|
||||
<h2>
|
||||
{{ 'TwoFactorAuth_StepX'|translate(2) }} - {{ 'TwoFactorAuth_SetupAuthenticatorOnDevice'|translate }}
|
||||
</h2>
|
||||
<p>{{ 'TwoFactorAuth_SetupAuthenticatorOnDeviceStep1'|translate }} <a rel="noreferrer noopener" href="https://github.com/andOTP/andOTP#downloads">andOTP</a>, <a rel="noreferrer noopener" href="https://authy.com/guides/github/">Authy</a>, <a rel="noreferrer noopener" href="https://support.1password.com/one-time-passwords/">1Password</a>, <a rel="noreferrer noopener" href="https://helpdesk.lastpass.com/multifactor-authentication-options/lastpass-authenticator/">LastPass Authenticator</a>, {{ 'General_Or'|translate }} <a rel="noreferrer noopener" href="https://support.google.com/accounts/answer/1066447">Google Authenticator</a>.
|
||||
</p>
|
||||
<p>{{ 'TwoFactorAuth_SetupAuthenticatorOnDeviceStep2'|translate('<a href="javascript:void(0)" onclick="piwikHelper.modalConfirm(\'#setupTwoFAsecretConfirm\')">', '</a>')|raw }}<br/>
|
||||
<div id="qrcode" title=""></div>
|
||||
<br />
|
||||
<button ng-show="setup2fa.step == 2" ng-click="setup2fa.nextStep()" class="btn goToStep3">{{ 'General_Next'|translate }}</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<a name="twoFactorStep3" id="twoFactorStep3" style="opacity: 0"></a>
|
||||
<div ng-show="setup2fa.step >= 3">
|
||||
<h2>{{ 'TwoFactorAuth_StepX'|translate(3) }} - {{ 'TwoFactorAuth_ConfirmSetup'|translate }}</h2>
|
||||
<p>{{ 'TwoFactorAuth_VerifyAuthCodeIntro'|translate }}</p>
|
||||
|
||||
{% if AccessErrorString %}
|
||||
<div class="message_container">
|
||||
<div piwik-notification
|
||||
noclear="true"
|
||||
context="error">
|
||||
<strong>{{ 'General_Error'|translate }}</strong>: {{ AccessErrorString|raw }}<br/>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post"
|
||||
action="{{ linkTo({'module': 'TwoFactorAuth', 'action': submitAction}) }}"
|
||||
class="setupConfirmAuthCodeForm"
|
||||
autocorrect="off" autocapitalize="none"
|
||||
autocomplete="off"
|
||||
>
|
||||
<div piwik-field uicontrol="text" name="authCode" maxlength="6"
|
||||
title="{{ 'TwoFactorAuth_AuthenticationCode'|translate|e('html_attr') }}"
|
||||
ng-model="setup2fa.authCode"
|
||||
inline-help="{{ 'TwoFactorAuth_VerifyAuthCodeHelp'|translate|e('html_attr') }}"
|
||||
placeholder="123456">
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="authCodeNonce" value="{{ authCodeNonce|e('html_attr') }}">
|
||||
<input type="submit" ng-disabled="setup2fa.authCode.length != 6"
|
||||
class="btn confirmAuthCode" value="{{ 'General_Confirm'|translate }}">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
window.twoFaBarCodeSetupUrl = {{ twoFaBarCodeSetupUrl|json_encode|raw }};
|
||||
</script>
|
||||
|
||||
<div id="setupTwoFAsecretConfirm" class="ui-confirm">
|
||||
<h2>{{ 'TwoFactorAuth_Your2FaAuthSecret'|translate }}</h2>
|
||||
<p style="text-align: center;"><code piwik-select-on-focus style="font-size: 30px;">{{ newSecret }}</code></p>
|
||||
<input role="ok" type="button" value="{{ 'General_Ok'|translate }}"/>
|
||||
</div>
|
@ -0,0 +1,38 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
function copyRecoveryCodesToClipboard()
|
||||
{
|
||||
var textarea = document.createElement('textarea');
|
||||
textarea.value = {{ codes|join("\n")|json_encode|raw }};
|
||||
textarea.setAttribute('readonly', '');
|
||||
textarea.style.position = 'absolute';
|
||||
textarea.style.left = '-9999px';
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
}
|
||||
function downloadRecoveryCodes()
|
||||
{
|
||||
piwikHelper.sendContentAsDownload('analytics_recovery_codes.txt', {{ codes|join("\n")|json_encode|raw }});
|
||||
}
|
||||
</script>
|
||||
|
||||
<p>{{ 'TwoFactorAuth_RecoveryCodesExplanation'|translate }}<br /><br /></p>
|
||||
<div class="alert alert-warning">{{ 'TwoFactorAuth_RecoveryCodesSecurity'|translate }}</div>
|
||||
|
||||
{% if codes|length > 0 %}
|
||||
<ul piwik-select-on-focus class="twoFactorRecoveryCodes">{% for code in codes %}
|
||||
<li>{{ code|upper|split('', 4)|join('-') }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="alert alert-danger">{{ 'TwoFactorAuth_RecoveryCodesAllUsed'|translate }}</div>
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
<br />
|
||||
<input type="button" class="btn backupRecoveryCode" onclick="downloadRecoveryCodes()" value="{{ 'General_Download'|translate }}">
|
||||
<input type="button" class="btn backupRecoveryCode" onclick="window.print()" value="{{ 'General_Print'|translate }}">
|
||||
<input type="button" class="btn backupRecoveryCode" onclick="copyRecoveryCodesToClipboard()" value="{{ 'General_Copy'|translate }}">
|
||||
</p>
|
@ -0,0 +1,56 @@
|
||||
{% extends '@Login/loginLayout.twig' %}
|
||||
|
||||
{% set title %}{{ 'TwoFactorAuth_TwoFactorAuthentication'|translate }}{% endset %}
|
||||
|
||||
{% block loginContent %}
|
||||
{% embed 'contentBlock.twig' with {'title': ('TwoFactorAuth_TwoFactorAuthentication'|translate)} %}
|
||||
{% block content %}
|
||||
|
||||
<div class="message_container">
|
||||
|
||||
{{ include('@Login/_formErrors.twig', {formErrors: form_data.errors } ) }}
|
||||
|
||||
{% if AccessErrorString %}
|
||||
<div piwik-notification
|
||||
noclear="true"
|
||||
context="error">
|
||||
<strong>{{ 'General_Error'|translate }}</strong>: {{ AccessErrorString|raw }}<br/>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<form {{ form_data.attributes|raw }} ng-non-bindable class="loginTwoFaForm">
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="hidden" name="form_nonce" id="login_form_nonce" value="{{ nonce }}"/>
|
||||
<input type="text" name="form_authcode" placeholder="" id="login_form_authcode" class="input" value="" size="20"
|
||||
autocorrect="off" autocapitalize="none" autocomplete="off"
|
||||
tabindex="10" autofocus="autofocus"/>
|
||||
<label for="login_form_authcode"><i class="icon-user icon"></i> {{ 'TwoFactorAuth_AuthenticationCode'|translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row actions">
|
||||
<div class="col s12">
|
||||
<input class="submit btn" id='login_form_submit' type="submit" value="{{ 'TwoFactorAuth_Verify'|translate|e('html_attr') }}"
|
||||
tabindex="100"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<p>{{ 'TwoFactorAuth_VerifyIdentifyExplanation'|translate }} {{ 'General_LearnMore'|translate('<a href="https://matomo.org/faq/general/faq_27245" rel="noreferrer noopener">', '</a>')|raw }}
|
||||
|
||||
<br /><br />
|
||||
<strong>{{ 'TwoFactorAuth_DontHaveYourMobileDevice'|translate }}</strong>
|
||||
<br />
|
||||
<a href="https://matomo.org/faq/how-to/faq_27248" rel="noreferrer noopener">{{ 'TwoFactorAuth_EnterRecoveryCodeInstead'|translate }}</a>
|
||||
<br />
|
||||
<a href="mailto:{{ superUserEmails|e('url') }}?subject={{ 'TwoFactorAuth_NotPossibleToLogIn'|translate|e('url') }}&body={{ 'TwoFactorAuth_LostAuthenticationDevice'|translate("\n\n", "\n\n", piwikUrl|default(''), "\n\n", userLogin, "https://matomo.org/faq/how-to/faq_27248")|e('url') }}" rel="noreferrer noopener">{{ 'TwoFactorAuth_AskSuperUserResetAuthenticationCode'|translate }}</a>
|
||||
<br />
|
||||
<a href="{{ linkTo({'module': loginModule, 'action': 'logout'}) }}" rel="noreferrer noopener">{{ 'General_Logout'|translate }}</a>
|
||||
</p>
|
||||
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
@ -0,0 +1,11 @@
|
||||
{% extends 'admin.twig' %}
|
||||
{% block content %}
|
||||
<div piwik-content-block class="twoFactorSetupFinished">
|
||||
<h2 class="successMessage">
|
||||
{{ 'TwoFactorAuth_SetupFinishedTitle'|translate }}
|
||||
</h2>
|
||||
<h3>{{ 'TwoFactorAuth_SetupFinishedSubtitle'|translate }}</h3>
|
||||
<p><br />
|
||||
<a class="btn" href="{{ linkTo({'module': 'UsersManager', 'action': 'userSettings'}) }}">{{ 'General_Continue'|translate }}</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
@ -0,0 +1,8 @@
|
||||
{% extends 'admin.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div piwik-content-block
|
||||
content-title="{{ 'TwoFactorAuth_SetUpTwoFactorAuthentication'|translate }}">
|
||||
{% include '@TwoFactorAuth/_setupTwoFactorAuth.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
@ -0,0 +1,9 @@
|
||||
{% extends '@Login/loginLayout.twig' %}
|
||||
|
||||
{% block loginContent %}
|
||||
<div piwik-content-block
|
||||
content-title="{{ 'TwoFactorAuth_RequiredToSetUpTwoFactorAuthentication'|translate }}">
|
||||
{% include '@TwoFactorAuth/_setupTwoFactorAuth.twig' %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@ -0,0 +1,42 @@
|
||||
{% extends 'admin.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<script type="text/javascript">
|
||||
function copyRecoveryCodesToClipboard()
|
||||
{
|
||||
var textarea = document.createElement('textarea');
|
||||
textarea.value = '{{ codes|join("\n")|e('js') }}';
|
||||
textarea.setAttribute('readonly', '');
|
||||
textarea.style.position = 'absolute';
|
||||
textarea.style.left = '-9999px';
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div piwik-content-block
|
||||
content-title="{{ 'TwoFactorAuth_TwoFactorAuthentication'|translate }} - {{ 'TwoFactorAuth_RecoveryCodes'|translate }}">
|
||||
|
||||
{% include '@TwoFactorAuth/_showRecoveryCodes.twig' %}
|
||||
|
||||
<h2>{{ 'TwoFactorAuth_GenerateNewRecoveryCodes'|translate }}</h2>
|
||||
<p>{{ 'TwoFactorAuth_GenerateNewRecoveryCodesInfo'|translate }}<br /><br /></p>
|
||||
|
||||
{% if regenerateSuccess %}
|
||||
<div class="alert alert-success">{{ 'TwoFactorAuth_RecoveryCodesRegenerated'|translate }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if regenerateError %}
|
||||
<div class="alert alert-danger">{{ 'General_ExceptionNonceMismatch'|translate }}</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="{{ linkTo({'method': 'TwoFactorAuth', 'action': 'showRecoveryCodes'}) }}" ng-non-bindable>
|
||||
<input type="hidden" name="regenerateNonce" value="{{ regenerateNonce }}">
|
||||
<input type="submit" class="btn" value="{{ 'TwoFactorAuth_GenerateNewRecoveryCodes'|translate }}">
|
||||
</form>
|
||||
|
||||
<div>
|
||||
{% endblock %}
|
@ -0,0 +1,41 @@
|
||||
<div piwik-content-block
|
||||
content-title="{{ 'TwoFactorAuth_TwoFactorAuthentication'|translate }} ({{ 'TwoFactorAuth_TwoFAShort'|translate }})" class="userSettings2FA">
|
||||
|
||||
<p>
|
||||
{{ 'TwoFactorAuth_TwoFactorAuthenticationIntro'|translate('<a href="https://matomo.org/faq/general/faq_27245" rel="noreferrer noopener">', '</a>')|raw }}
|
||||
</p>
|
||||
|
||||
{% if isEnabled %}
|
||||
<p><strong class="twoFaStatusEnabled">{{ 'TwoFactorAuth_TwoFactorAuthenticationIsEnabled'|translate }}</strong></p>
|
||||
|
||||
<p>
|
||||
{% if isForced %}
|
||||
{{ 'TwoFactorAuth_TwoFactorAuthenticationRequired'|translate }}
|
||||
<br />
|
||||
<br />
|
||||
<a class="btn btn-link enable2FaLink" href="{{ linkTo({'module': 'TwoFactorAuth', 'action': 'setupTwoFactorAuth'}) }}">{{ 'TwoFactorAuth_ConfigureDifferentDevice'|translate }}</a>
|
||||
{% else %}
|
||||
<a class="btn btn-link enable2FaLink" href="{{ linkTo({'module': 'TwoFactorAuth', 'action': 'setupTwoFactorAuth'}) }}">{{ 'TwoFactorAuth_ConfigureDifferentDevice'|translate }}</a>
|
||||
<a href="{{ linkTo({'module': 'TwoFactorAuth', 'action': 'disableTwoFactorAuth', 'disableNonce': disableNonce}) }}" style="display:none;" id="disable2fa">disable2fa</a>
|
||||
<input type="button"
|
||||
class="btn btn-link disable2FaLink"
|
||||
onclick="twoFactorAuth.confirmDisable2FA('{{ disableNonce|e('url') }}');"
|
||||
value="{{ 'TwoFactorAuth_DisableTwoFA'|translate }}">
|
||||
{% endif %}
|
||||
<a class="btn btn-link showRecoveryCodesLink" href="{{ linkTo({'module': 'TwoFactorAuth', 'action': 'showRecoveryCodes'}) }}">{{ 'TwoFactorAuth_ShowRecoveryCodes'|translate }}</a>
|
||||
</p>
|
||||
{% else %}
|
||||
<p><strong>{{ 'TwoFactorAuth_TwoFactorAuthenticationIsDisabled'|translate }}</strong>
|
||||
<br />
|
||||
<br />
|
||||
<a class="btn btn-link enable2FaLink" href="{{ linkTo({'module': 'TwoFactorAuth', 'action': 'setupTwoFactorAuth'}) }}">{{ 'TwoFactorAuth_EnableTwoFA'|translate }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<div id="confirmDisable2FA" class="ui-confirm">
|
||||
<h2>{{ 'TwoFactorAuth_ConfirmDisableTwoFA'|translate }}</h2>
|
||||
<input role="yes" type="button" value="{{ 'General_Yes'|translate }}"/>
|
||||
<input role="no" type="button" value="{{ 'General_No'|translate }}"/>
|
||||
</div>
|
||||
|
||||
</div>
|
Reference in New Issue
Block a user