From 6ccaec59bd2acb5586901ffa8656a7fb74fc8605 Mon Sep 17 00:00:00 2001 From: Mohamed El-Kalioby Date: Sat, 26 Jan 2019 00:06:00 +0300 Subject: [PATCH] Trying Code blick --- docs/installation.md | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 5c9c8f2..4011387 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -12,21 +12,21 @@ ``` 1. Add the following settings to your file - ```python - MFA_UNALLOWED_METHODS=() # Methods that shouldn't be allowed for the user - MFA_LOGIN_CALLBACK="" # A function that should be called by username to login the user in session - MFA_RECHECK=True # Allow random rechecking of the user - MFA_RECHECK_MIN=10 # Minimum interval in seconds - MFA_RECHECK_MAX=30 # Maximum in seconds - MFA_QUICKLOGIN=True # Allow quick login for returning users by provide only their 2FA - - TOKEN_ISSUER_NAME="PROJECT_NAME" #TOTP Issuer name - - U2F_APPID="https://localhost" #URL For U2F - FIDO_SERVER_ID=u"localehost" # Server rp id for FIDO2, it the full domain of your project - FIDO_SERVER_NAME=u"PROJECT_NAME" - FIDO_LOGIN_URL=BASE_URL - ``` + MFA_UNALLOWED_METHODS=() # Methods that shouldn't be allowed for the user + MFA_LOGIN_CALLBACK="" # A function that should be called by username to login the user in session + MFA_RECHECK=True # Allow random rechecking of the user + MFA_RECHECK_MIN=10 # Minimum interval in seconds + MFA_RECHECK_MAX=30 # Maximum in seconds + MFA_QUICKLOGIN=True # Allow quick login for returning users by provide only their 2FA + + TOKEN_ISSUER_NAME="PROJECT_NAME" #TOTP Issuer name + + U2F_APPID="https://localhost" #URL For U2 + FIDO_SERVER_ID=u"localehost" # Server rp id for FIDO2, it the full domain of your project + FIDO_SERVER_NAME=u"PROJECT_NAME" + FIDO_LOGIN_URL=BASE_URL + + **Method Names** * U2F * FIDO2 @@ -37,16 +37,16 @@ **Note**: Starting version 1.1, ~~FIDO_LOGIN_URL~~ isn't required for FIDO2 anymore. 1. Add mfa to urls.py - `python - import mfa - import mfa.TrustedDevice - urls_patterns= [ - '...', - url(r'^mfa/', include('mfa.urls')), - url(r'devices/add$', mfa.TrustedDevice.add,name="mfa_add_new_trusted_device"), # This short link to add new trusted device - '....', + + import mfa + import mfa.TrustedDevice + urls_patterns= [ + '...', + url(r'^mfa/', include('mfa.urls')), + url(r'devices/add$', mfa.TrustedDevice.add,name="mfa_add_new_trusted_device"), # This short link to add new trusted device + '....', ] - ` + 1. Provide `mfa_auth_base.html` in your templaes with block called 'head' and 'content' The template will be included during the user login. If you will use Email Token method, then you have to provide template named `mfa_email_token_template.html` that will content the format of the email with parameter named `user` and `otp`.