Skip to content

Commit

Permalink
Revert "Bearer handling"
Browse files Browse the repository at this point in the history
This reverts commit 57c3cca.
  • Loading branch information
ieaves committed Nov 3, 2023
1 parent 57c3cca commit 3c1a1ac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 2 additions & 0 deletions grai-server/app/auth/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def _generate_token(user: User) -> str:
def send_validation_email(user: User):
token = _generate_token(user)

print(token)

c = {
"base_url": config("FRONTEND_URL", "http://localhost:3000"),
"token": token,
Expand Down
9 changes: 9 additions & 0 deletions grai-server/app/scripts/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os

import django

os.environ["DJANGO_SETTINGS_MODULE"] = "the_guide.settings.dev"
django.setup()
import lineage.serializers as s

print(repr(s.EdgeSerializer()))
14 changes: 2 additions & 12 deletions grai-server/app/workspaces/permissions.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
from rest_framework_api_key.permissions import BaseHasAPIKey, KeyParser, APIKey
from django.http import HttpRequest
import re
from .models import WorkspaceAPIKey


class BearerKeyParser(KeyParser):
keyword = "Bearer"
from rest_framework_api_key.permissions import BaseHasAPIKey


class BearerApiKey(BaseHasAPIKey):
model = APIKey
key_parser = BearerKeyParser()
from .models import WorkspaceAPIKey


class HasWorkspaceAPIKey(BaseHasAPIKey):
Expand Down

0 comments on commit 3c1a1ac

Please sign in to comment.