@add_route("<STR_LIT>", "<STR_LIT>", methods=["<STR_LIT:GET>", "<STR_LIT:POST>"])<EOL>@add_route("<STR_LIT>", "<STR_LIT>", methods=["<STR_LIT:GET>", "<STR_LIT:POST>"])<EOL>def login(context, request):
<EOL>__ac_name = request.get("<STR_LIT>", None)<EOL>__ac_password = request.get("<STR_LIT>", None)<EOL>logger.info("<STR_LIT>" % __ac_name)<EOL>if __ac_name is None:<EOL><INDENT>api.fail(<NUM_LIT>, "<STR_LIT>")<EOL><DEDENT>if __ac_password is None:<EOL><INDENT>api.fail(<NUM_LIT>, "<STR_LIT>")<EOL><DEDENT>acl_users = api.get_tool("<STR_LIT>")<EOL>acl_users.credentials_cookie_auth.login()<EOL>if api.is_anonymous():<EOL><INDENT>api.fail(<NUM_LIT>, "<STR_LIT>")<EOL><DEDENT>return get(context, request, username=__ac_name)<EOL>
Login Route

    Login route to authenticate a user against Plone.