Did I find the right examples for you? yes no

All Samples(17)  |  Call(17)  |  Derive(0)  |  Import(0)

src/s/m/smeuhsocial-HEAD/apps/django_openid/auth.py   smeuhsocial(Download)
        # weird, unfortunately.
        if not request.openid:
            return self.show_error(request, 'You should be logged in here')
        users = self.lookup_openid(request, request.openid.openid)
        try:
            user = [u for u in users if str(u.id) == user_id][0]
        except IndexError, e:
            return self.show_error(request, "You didn't pick a valid user")
        # OK, log them in
        self.log_in_user(request, user)
                )
            except signed.BadSignature:
                return self.show_error(request, self.csrf_failed_message)
            # Associate openid with their account, if it isn't already
            if not request.user.openids.filter(openid = openid):
                request.user.openids.create(openid = openid)
            return self.show_associate_done(request, openid)
 
        return self.show_error(request, 'Should POST to here')
    def need_authenticated_user(self, request):
        return self.show_error(request, self.need_authenticated_user_message)
 
    def do_associations(self, request):
        "Interface for managing your account's associated OpenIDs"

src/d/j/django-openid-HEAD/django_openid/auth.py   django-openid(Download)
        # weird, unfortunately.
        if not request.openid:
            return self.show_error(request, 'You should be logged in here')
        users = self.lookup_openid(request, request.openid.openid)
        try:
            user = [u for u in users if str(u.id) == user_id][0]
        except IndexError, e:
            return self.show_error(request, "You didn't pick a valid user")
        # OK, log them in
        self.log_in_user(request, user)
                )
            except signed.BadSignature:
                return self.show_error(request, self.csrf_failed_message)
            # Associate openid with their account, if it isn't already
            if not request.user.openids.filter(openid = openid):
                request.user.openids.create(openid = openid)
            return self.show_associate_done(request, openid)
 
        return self.show_error(request, 'Should POST to here')
    def need_authenticated_user(self, request):
        return self.show_error(request, self.need_authenticated_user_message)
 
    def do_associations(self, request):
        "Interface for managing your account's associated OpenIDs"

src/m/y/mycogia.com-HEAD/apps/django_openid/auth.py   mycogia.com(Download)
        # weird, unfortunately.
        if not request.openid:
            return self.show_error(request, 'You should be logged in here')
        users = self.lookup_openid(request, request.openid.openid)
        try:
            user = [u for u in users if str(u.id) == user_id][0]
        except IndexError, e:
            return self.show_error(request, "You didn't pick a valid user")
        # OK, log them in
        self.log_in_user(request, user)
                )
            except signed.BadSignature:
                return self.show_error(request, self.csrf_failed_message)
            # Associate openid with their account, if it isn't already
            if not request.user.openids.filter(openid = openid):
                request.user.openids.create(openid = openid)
            return self.show_associate_done(request, openid)
 
        return self.show_error(request, 'Should POST to here')
    def need_authenticated_user(self, request):
        return self.show_error(self.need_authenticated_user_message)
 
    def do_associations(self, request):
        "Interface for managing your account's associated OpenIDs"