mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-13 08:58:35 +03:00
Fixed parameters order for coherence
This commit is contained in:
parent
52096b1eff
commit
165bd89829
@ -124,7 +124,7 @@ class MFA(Module):
|
||||
"""
|
||||
return 'MFA Code'
|
||||
|
||||
def html(self, userId: str, request: 'ExtendedHttpRequest', username: str) -> str:
|
||||
def html(self, request: 'ExtendedHttpRequest', userId: str, username: str) -> str:
|
||||
"""
|
||||
This method will be invoked from the MFA form, to know the HTML that will be presented
|
||||
to the user below the MFA code form.
|
||||
|
@ -182,7 +182,7 @@ class EmailMFA(mfas.MFA):
|
||||
self.fromEmail.value = validators.validateEmail(self.fromEmail.value)
|
||||
|
||||
|
||||
def html(self, userId: str, request: 'ExtendedHttpRequest', username: str) -> str:
|
||||
def html(self, request: 'ExtendedHttpRequest', userId: str, username: str) -> str:
|
||||
return gettext('Check your mail. You will receive an email with the verification code')
|
||||
|
||||
@classmethod
|
||||
|
@ -193,7 +193,7 @@ class RadiusOTP(mfas.MFA):
|
||||
def label(self) -> str:
|
||||
return gettext('OTP Code')
|
||||
|
||||
def html(self, userId: str, request: 'ExtendedHttpRequest', username: str) -> str:
|
||||
def html(self, request: 'ExtendedHttpRequest', userId: str, username: str) -> str:
|
||||
'''
|
||||
ToDo:
|
||||
- Maybe create a field in mfa definition to edit from admin panel ?
|
||||
|
@ -398,7 +398,7 @@ class SMSMFA(mfas.MFA):
|
||||
return gettext('MFA Code')
|
||||
|
||||
|
||||
def html(self, userId: str, request: 'ExtendedHttpRequest', username: str) -> str:
|
||||
def html(self, request: 'ExtendedHttpRequest', userId: str, username: str) -> str:
|
||||
return gettext('Check your phone. You will receive an SMS with the verification code')
|
||||
|
||||
def sendCode(self, request: 'ExtendedHttpRequest', userId: str, username: str, identifier: str, code: str) -> mfas.MFA.RESULT:
|
||||
|
@ -164,7 +164,7 @@ class TOTP_MFA(mfas.MFA):
|
||||
self._userData(userId)[0], issuer=self.issuer.value, name=username
|
||||
)
|
||||
|
||||
def html(self, userId: str, request: 'ExtendedHttpRequest', username: str) -> str:
|
||||
def html(self, request: 'ExtendedHttpRequest', userId: str, username: str) -> str:
|
||||
# Get data from storage related to this user
|
||||
secret, qrShown = self._userData(userId)
|
||||
if qrShown:
|
||||
|
@ -300,7 +300,7 @@ def mfa(request: ExtendedHttpRequest) -> HttpResponse:
|
||||
remember_device = _('{} hours').format(mfaProvider.remember_device)
|
||||
|
||||
# Html from MFA provider
|
||||
mfaHtml = mfaInstance.html(mfaUserId, request, request.user.name)
|
||||
mfaHtml = mfaInstance.html(request, mfaUserId, request.user.name)
|
||||
|
||||
# Redirect to index, but with MFA data
|
||||
request.session['mfa'] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user