Skip to content

Commit

Permalink
add more types
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Mar 19, 2024
1 parent 770361c commit 5fd3307
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/linked_services/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2024-present jefer94 <[email protected]>
#
# SPDX-License-Identifier: LGPL-3.0-or-later
__version__ = "1.1.2"
__version__ = "1.1.3"
36 changes: 36 additions & 0 deletions src/linked_services/rest_framework/types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import uuid

from adrf.requests import AsyncRequest as BaseAsyncRequest
from django.contrib.auth.models import User
from django.http.request import HttpRequest as BaseHttpRequest
Expand All @@ -17,3 +19,37 @@ def __init__(self, *args, **kwargs):

def get_user() -> User | None:
pass


class LinkedToken:
def __init__(self, *args, **kwargs):
raise Exception("This class cannot be instantiated")

sub: int | str | uuid.UUID
iss: str
app: str
aud: str
exp: float
iat: float
typ: str


class LinkedApp:
def __init__(self, *args, **kwargs):
raise Exception("This class cannot be instantiated")

id: int | str | uuid.UUID
private_key: bytes
public_key: bytes | None
algorithm: str
strategy: str
schema: str
schema: str
require_an_agreement: bool
webhook_url: float
redirect_url: float
app_url: float


class LinkedApplication(LinkedApp):
pass

0 comments on commit 5fd3307

Please sign in to comment.