Skip to content

Commit

Permalink
pydocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio committed May 27, 2023
1 parent 853f883 commit 23765e7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/wiki
Submodule wiki added at e4d454
17 changes: 17 additions & 0 deletions src/OpenAIAuth.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ def __init__(
use_cache: bool = True,
mfa: str = None,
):
"""
Initializes an instance of the Auth0 class.
Args:
- email (str): The email address of the user.
- password (str): The password of the user.
- proxy (str, optional): The proxy server to use for requests. Defaults to None.
- use_cache (bool, optional): Flag indicating whether to use cache for access token. Defaults to True.
- mfa (str, optional): The multi-factor authentication method. Defaults to None.
"""
self.session_token = None
self.email = email
self.password = password
Expand Down Expand Up @@ -49,6 +59,13 @@ def __check_email(email: str):
return re.fullmatch(regex, email)

def auth(self) -> str:
"""
Authenticates the user and returns the access token.
Returns:
- str: The access token.
"""

if (
self.use_cache
and self.access_token
Expand Down

0 comments on commit 23765e7

Please sign in to comment.