Did I find the right examples for you? yes no

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

src/v/o/vosae-app-HEAD/www/core/api/utils/authentication.py   vosae-app(Download)
            email, api_key = self.extract_credentials(request)
        except ValueError:
            return self._unauthorized()
 
        if not email or not api_key:
            return self._unauthorized()
            user = UserModel._default_manager.get(email=email)
        except (UserModel.DoesNotExist, UserModel.MultipleObjectsReturned):
            return self._unauthorized()
 
        if not self.check_active(user):
            ApiKey.objects.get(user=user, key=api_key)
        except ApiKey.DoesNotExist:
            return self._unauthorized()
 
        return True

src/d/j/django-openbudget-0.1.0/openbudgetapp/api/openbudgetapi.py   django-openbudget(Download)
 
        if not username or not api_key:
            return self._unauthorized()
        try:
            user = User.objects.get(username=username)
        except (User.DoesNotExist, User.MultipleObjectsReturned):
            return self._unauthorized()

src/a/k/akvo-rsr-HEAD/akvo/api/authentication.py   akvo-rsr(Download)
 
        if not username or not api_key:
            return self._unauthorized()
 
        try:
            user = User.objects.get(username=username)
        except (User.DoesNotExist, User.MultipleObjectsReturned):
            return self._unauthorized()

src/d/a/damn-cms-HEAD/extensions/tastypie/authentication.py   damn-cms(Download)
 
		if not username or not api_key:
			return self._unauthorized()
		try:
			user = User.objects.get(username=username)
		except (User.DoesNotExist, User.MultipleObjectsReturned):
			return self._unauthorized()

src/d/j/django-openbudget-HEAD/openbudgetapp/api/openbudgetapi.py   django-openbudget(Download)
 
        if not username or not api_key:
            return self._unauthorized()
        try:
            user = User.objects.get(username=username)
        except (User.DoesNotExist, User.MultipleObjectsReturned):
            return self._unauthorized()

src/s/c/ScrumDo-HEAD/scrumdo-web/apps/api/auth.py   ScrumDo(Download)
            key = UserApiKey.objects.get(user=user, key=api_key)
        except UserApiKey.DoesNotExist:
            return self._unauthorized()
 
        if key.developer_key and key.developer_key.approved:
            return True
        else:
            return self._unauthorized()
 
        if not username or not api_key:
            return self._unauthorized()
 
        try:
            user = User.objects.get(username=username)
        except (User.DoesNotExist, User.MultipleObjectsReturned):
            return self._unauthorized()

src/p/a/panda-HEAD/panda/api/utils.py   panda(Download)
            return True
 
        return self._unauthorized()
 
    def get_identifier(self, request):

src/d/j/django-boundaryservice-0.1.11/boundaryservice/authentication.py   django-boundaryservice(Download)
            user = User.objects.get(username=username)
        except (User.DoesNotExist, User.MultipleObjectsReturned):
            return self._unauthorized()
 
        request.user = user

src/d/j/django-boundaryservice-HEAD/boundaryservice/authentication.py   django-boundaryservice(Download)
            user = User.objects.get(username=username)
        except (User.DoesNotExist, User.MultipleObjectsReturned):
            return self._unauthorized()
 
        request.user = user

src/m/o/moztrap-HEAD/moztrap/model/mtapi.py   moztrap(Download)
        except Exception as e:
            logger.debug("api key is NOT authorized\n%s" % e)
            return self._unauthorized()
 
        return True
            elif not api_key:  # pragma: no cover
                logger.debug("no api key")  # pragma: no cover
            return self._unauthorized()
 
        try:
            user = User.objects.get(username=username)
        except (User.DoesNotExist, User.MultipleObjectsReturned):
            logger.debug("user retrieval error")
            return self._unauthorized()

  1 | 2  Next