Exemple #1
0
    def auth(self):
        request = self.request

        # log out request
        if request.POST.get("persona", None) == "-1":
            request.response.merge_cookies(logout(request))
            request.session.invalidate()
            request.user = None

        form_style = request.user and "form-horizontal" or "form-vertical"
        return auth(request)(request, action="app", bootstrap_form_style=form_style, formid="auth")
Exemple #2
0
    def persona(self):
        request = self.request

        # logout request
        if request.params.get('persona', None) == '-1':
            request.add_response_callback(
                lambda req, res: logout(req).merge_cookies(res))
            request.user = None

        return persona(
            request,
            bootstrap_form_style='form-horizontal',
            formid='persona',
        )
Exemple #3
0
    def persona(self):
        request = self.request

        # logout request
        if request.params.get('persona', None) == '-1':
            request.add_response_callback(
                lambda req, res: logout(req).merge_cookies(res)
            )
            request.user = None

        return persona(
            request,
            bootstrap_form_style='form-horizontal',
            formid='persona',
        )