accountant/api/controller/users.py
2015-06-05 18:37:17 +02:00

30 lines
979 B
Python

"""
This file is part of Accountant.
Accountant is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Accountant is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
"""
from . import auth
from .. import api
from ..model import db, session_scope
@auth.verify_password
def verify_password(username, password):
if username == 'titi' and password == 'toto':
return True
# Update principal identity
return False