MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / validate

Method validate

web/pgadmin/authenticate/mfa/email.py:195–201  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

193 return email_authentication_label()
194
195 def validate(self, **kwargs):
196 code = kwargs.get('code', None)
197 email_otp = session.get("mfa_email_code", None)
198 if code is not None and email_otp is not None and code == email_otp:
199 session.pop("mfa_email_code")
200 return
201 raise ValidationException("Invalid code")
202
203 def validation_view(self):
204 session.pop("mfa_email_code", None)

Callers

nothing calls this directly

Calls 3

ValidationExceptionClass · 0.85
popMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected