-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into PSG-5523-dateutil-dependency
- Loading branch information
Showing
9 changed files
with
192 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
"""Initializes the Passage identity package.""" | ||
|
||
from .errors import PassageError | ||
from .models import MagicLinkArgs, MagicLinkOptions | ||
from .passage import Passage | ||
|
||
__all__ = [ | ||
"MagicLinkArgs", | ||
"MagicLinkOptions", | ||
"Passage", | ||
"PassageError", | ||
] |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"""Defines required arguments for creating a Magic Link.""" | ||
|
||
from typing import Union | ||
|
||
from passageidentity.openapi_client.models.magic_link_channel import MagicLinkChannel | ||
from passageidentity.openapi_client.models.magic_link_type import MagicLinkType | ||
|
||
|
||
class MagicLinkArgsBase: | ||
"""Base class for MagicLinkArgs.""" | ||
|
||
type: MagicLinkType | ||
send: bool | ||
|
||
|
||
class MagicLinkWithEmailArgs(MagicLinkArgsBase): | ||
"""Arguments for creating a Magic Link with an email.""" | ||
|
||
email: str | ||
|
||
|
||
class MagicLinkWithPhoneArgs(MagicLinkArgsBase): | ||
"""Arguments for creating a Magic Link with a phone number.""" | ||
|
||
phone: str | ||
|
||
|
||
class MagicLinkWithUserArgs(MagicLinkArgsBase): | ||
"""Arguments for creating a Magic Link with a user ID.""" | ||
|
||
user_id: str | ||
channel: MagicLinkChannel | ||
|
||
|
||
MagicLinkArgs = Union[MagicLinkWithEmailArgs, MagicLinkWithPhoneArgs, MagicLinkWithUserArgs] |
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,12 @@ | ||
"""Defines options for creating a Magic Link.""" | ||
|
||
from __future__ import annotations | ||
|
||
|
||
class MagicLinkOptions: | ||
"""Options for creating a Magic Link.""" | ||
|
||
language: str | None | ||
magic_link_path: str | None | ||
redirect_url: str | None | ||
ttl: int | None |
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
Oops, something went wrong.