from repoze.who.api import get_api
who_api = get_api(request.environ)
creds = {}
creds['login'] = yourusername
creds['password'] = yourpassword
authenticated, headers = who_api.login(creds)
How do I log a user in using repoze.who?