12 lines
389 B
Plaintext
12 lines
389 B
Plaintext
username = params_kw.get('username')
|
|
passwd = params_kw.get('passwd')
|
|
if not passwd:
|
|
return UiError(title='Login failed', message='Password is required')
|
|
passwd = password(passwd)
|
|
rzt = await check_user_password(request, username, passwd)
|
|
if rzt:
|
|
return UiMessage(title='Logined', message=f'Welcome back ')
|
|
return UiError(title='login failed', message='user and password mismatch')
|
|
|
|
|