square-authentication 7.0.0__py3-none-any.whl → 8.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100,6 +100,37 @@ try:
100
100
 
101
101
  MAIL_GUN_API_KEY = ldict_configuration["EMAIL"]["MAIL_GUN_API_KEY"]
102
102
  # ===========================================
103
+ # ===========================================
104
+ # GOOGLE
105
+
106
+ GOOGLE_AUTH_PLATFORM_CLIENT_ID = ldict_configuration["GOOGLE"][
107
+ "GOOGLE_AUTH_PLATFORM_CLIENT_ID"
108
+ ]
109
+ # ===========================================
110
+ # ===========================================
111
+ # GOOGLE
112
+
113
+ NUMBER_OF_RECOVERY_CODES = int(
114
+ ldict_configuration["LOGIC"]["NUMBER_OF_RECOVERY_CODES"]
115
+ )
116
+ EXPIRY_TIME_FOR_EMAIL_VERIFICATION_CODE_IN_SECONDS = int(
117
+ ldict_configuration["LOGIC"][
118
+ "EXPIRY_TIME_FOR_EMAIL_VERIFICATION_CODE_IN_SECONDS"
119
+ ]
120
+ )
121
+ NUMBER_OF_DIGITS_IN_EMAIL_VERIFICATION_CODE = int(
122
+ ldict_configuration["LOGIC"]["NUMBER_OF_DIGITS_IN_EMAIL_VERIFICATION_CODE"]
123
+ )
124
+ EXPIRY_TIME_FOR_EMAIL_PASSWORD_RESET_CODE_IN_SECONDS = int(
125
+ ldict_configuration["LOGIC"][
126
+ "EXPIRY_TIME_FOR_EMAIL_PASSWORD_RESET_CODE_IN_SECONDS"
127
+ ]
128
+ )
129
+ NUMBER_OF_DIGITS_IN_EMAIL_PASSWORD_RESET_CODE = int(
130
+ ldict_configuration["LOGIC"]["NUMBER_OF_DIGITS_IN_EMAIL_PASSWORD_RESET_CODE"]
131
+ )
132
+ # ===========================================
133
+
103
134
  # Initialize logger
104
135
  global_object_square_logger = SquareLogger(
105
136
  pstr_log_file_name=config_str_log_file_name,
@@ -54,4 +54,14 @@ SQUARE_FILE_STORE_IP = localhost
54
54
  SQUARE_FILE_STORE_PORT = 10100
55
55
 
56
56
  [EMAIL]
57
- MAIL_GUN_API_KEY = dummy_mailgun_api_key
57
+ MAIL_GUN_API_KEY = dummy_mailgun_api_key
58
+
59
+ [GOOGLE]
60
+ GOOGLE_AUTH_PLATFORM_CLIENT_ID = dummy_google_client_id
61
+
62
+ [LOGIC]
63
+ NUMBER_OF_RECOVERY_CODES = 10
64
+ EXPIRY_TIME_FOR_EMAIL_VERIFICATION_CODE_IN_SECONDS = 600
65
+ NUMBER_OF_DIGITS_IN_EMAIL_VERIFICATION_CODE = 6
66
+ EXPIRY_TIME_FOR_EMAIL_PASSWORD_RESET_CODE_IN_SECONDS = 600
67
+ NUMBER_OF_DIGITS_IN_EMAIL_PASSWORD_RESET_CODE = 6
@@ -54,4 +54,14 @@ SQUARE_FILE_STORE_IP = raspi.thepmsquare.com
54
54
  SQUARE_FILE_STORE_PORT = 20010
55
55
 
56
56
  [EMAIL]
57
- MAIL_GUN_API_KEY = dummy_mailgun_api_key
57
+ MAIL_GUN_API_KEY = dummy_mailgun_api_key
58
+
59
+ [GOOGLE]
60
+ GOOGLE_AUTH_PLATFORM_CLIENT_ID = dummy_google_client_id
61
+
62
+ [LOGIC]
63
+ NUMBER_OF_RECOVERY_CODES = 10
64
+ EXPIRY_TIME_FOR_EMAIL_VERIFICATION_CODE_IN_SECONDS = 600
65
+ NUMBER_OF_DIGITS_IN_EMAIL_VERIFICATION_CODE = 6
66
+ EXPIRY_TIME_FOR_EMAIL_PASSWORD_RESET_CODE_IN_SECONDS = 600
67
+ NUMBER_OF_DIGITS_IN_EMAIL_PASSWORD_RESET_CODE = 6
@@ -27,4 +27,6 @@ messages = {
27
27
  "EMAIL_ALREADY_VERIFIED": "your email address has already been verified.",
28
28
  "INCORRECT_VERIFICATION_CODE": "the verification code you entered is incorrect or has expired. please request a new code.",
29
29
  "EMAIL_NOT_VERIFIED": "your email address has not been verified. please verify your email to continue.",
30
+ "ACCOUNT_WITH_EMAIL_ALREADY_EXISTS": "an account with this email address already exists.",
31
+ "MALFORMED_USER": " the user data is malformed or incomplete.",
30
32
  }
@@ -10,6 +10,12 @@ class RegisterUsernameV0(BaseModel):
10
10
  app_id: Optional[int] = None
11
11
 
12
12
 
13
+ class RegisterLoginGoogleV0(BaseModel):
14
+ google_id: str
15
+ app_id: Optional[int] = None
16
+ assign_app_id_if_missing: bool = False
17
+
18
+
13
19
  class LoginUsernameV0(BaseModel):
14
20
  username: str
15
21
  password: str
@@ -24,6 +30,8 @@ class DeleteUserV0(BaseModel):
24
30
  class UpdatePasswordV0(BaseModel):
25
31
  old_password: str
26
32
  new_password: str
33
+ logout_other_sessions: bool = False
34
+ preserve_session_refresh_token: Optional[str] = None
27
35
 
28
36
 
29
37
  class TokenType(Enum):
@@ -40,8 +48,16 @@ class ResetPasswordAndLoginUsingBackupCodeV0(BaseModel):
40
48
  username: str
41
49
  new_password: str
42
50
  app_id: int
51
+ logout_other_sessions: bool = False
43
52
 
44
53
 
45
54
  class SendResetPasswordEmailV0(BaseModel):
46
55
  username: str
56
+
57
+
58
+ class ResetPasswordAndLoginUsingResetEmailCodeV0(BaseModel):
59
+ reset_email_code: str
60
+ username: str
61
+ new_password: str
47
62
  app_id: int
63
+ logout_other_sessions: bool = False