Add webauth as an auth type

When showing what auth type user uses to sign in, add a text
for users with webauthn.

On password change or sign in, throw not implemented error
if user uses webauthn auth.
This commit is contained in:
Pea Tyczynska
2021-05-12 17:24:47 +01:00
parent 78824f54fd
commit 2a756f90d4
4 changed files with 12 additions and 2 deletions

View File

@@ -169,6 +169,10 @@ class User(JSONModel, UserMixin):
def email_auth(self):
return self.auth_type == 'email_auth'
@property
def webauthn_auth(self):
return self.auth_type == 'webauthn_auth'
def reset_failed_login_count(self):
user_api_client.reset_failed_login_count(self.id)