Commit acce93e0 by Tim Babych

pep8

parent b75f00f1
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from annotator.annotation import Annotation from annotator.annotation import Annotation
class Command(BaseCommand): class Command(BaseCommand):
help = 'Creates the mapping in the index.' help = 'Creates the mapping in the index.'
......
...@@ -5,9 +5,11 @@ from rest_framework.permissions import BasePermission ...@@ -5,9 +5,11 @@ from rest_framework.permissions import BasePermission
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class TokenWrongIssuer(Exception): class TokenWrongIssuer(Exception):
pass pass
class HasAccessToken(BasePermission): class HasAccessToken(BasePermission):
""" """
Allow requests having valid ID Token. Allow requests having valid ID Token.
......
...@@ -26,6 +26,7 @@ class MockAuthenticator(object): ...@@ -26,6 +26,7 @@ class MockAuthenticator(object):
def mock_authorizer(*args, **kwargs): def mock_authorizer(*args, **kwargs):
return True return True
def get_id_token(user): def get_id_token(user):
now = datetime.utcnow() now = datetime.utcnow()
return jwt.encode({ return jwt.encode({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment