-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesign auth flow to use AbandonAuth UI and redirects to create a secure auth flow
- Loading branch information
Showing
20 changed files
with
499 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from prisma import Prisma | ||
|
||
prisma_db = Prisma(auto_register=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
from .developer_application import CreateDeveloperApplicationDto, DeveloperApplicationDto, LoginDeveloperApplicationDto | ||
from .developer_application import ( | ||
CallbackUriDto, | ||
CreateCallbackUriDto, | ||
CreateDeveloperApplicationDto, | ||
DeveloperApplicationDto, | ||
DeveloperApplicationWithCallbackUriDto, | ||
LoginDeveloperApplicationDto | ||
) | ||
from .discord import DiscordLoginDto | ||
from .auth import JwtDto | ||
from .user import UserDto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,31 @@ | ||
from datetime import datetime | ||
from enum import Enum | ||
|
||
from pydantic import BaseModel | ||
|
||
|
||
class JwtDto(BaseModel): | ||
"""Contains jwt token data to be sent to a client.""" | ||
|
||
token: str | ||
|
||
|
||
class ScopeEnum(str, Enum): | ||
identify = "identify" | ||
abandonauth = "abandonauth" | ||
none = None | ||
|
||
|
||
class LifespanEnum(str, Enum): | ||
long = "long" | ||
short = "short" | ||
|
||
|
||
class JwtClaimsDataDto(BaseModel): | ||
"""All claim data for an Abandon Auth JWT""" | ||
|
||
user_id: str | ||
exp: datetime | ||
scope: str | ||
aud: str | ||
lifespan: LifespanEnum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.