From debbecad0de69025fa7a17145fe0e8e19b16a1e6 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Wed, 10 Apr 2024 11:18:22 +0500 Subject: [PATCH 1/8] email feature added --- .../features/web/web_tests.feature | 7 +- .../common/step_definitions/__init__.py | 1 + .../frontend/common/step_definitions/email.py | 67 ++++++++++ .../setup_tests/test_installation_check.py | 1 + main/utils/credentials.json | 12 ++ main/utils/email_reader.py | 119 ++++++++++++++++++ main/utils/email_reader_token_generator.py | 110 ++++++++++++++++ main/utils/token.pickle | Bin 0 -> 905 bytes test_data/files/email_data.json | 0 test_data/files/email_reader.txt | 0 10 files changed, 316 insertions(+), 1 deletion(-) create mode 100644 main/frontend/common/step_definitions/email.py create mode 100644 main/utils/credentials.json create mode 100644 main/utils/email_reader.py create mode 100644 main/utils/email_reader_token_generator.py create mode 100644 main/utils/token.pickle create mode 100644 test_data/files/email_data.json create mode 100644 test_data/files/email_reader.txt diff --git a/frontend/test_project/features/web/web_tests.feature b/frontend/test_project/features/web/web_tests.feature index 57854169..de961438 100644 --- a/frontend/test_project/features/web/web_tests.feature +++ b/frontend/test_project/features/web/web_tests.feature @@ -173,4 +173,9 @@ Feature: OrangeHRM Login and Modus QA blog And I click item 'Contractor. Understanding' for element 'Modus_Site > Careers > form_dropdown' And I click item 'Yes' for element 'Modus_Site > Careers > position_dropdown' And I click item 'data protection apps upon hire' for element 'Modus_Site > Careers > form_dropdown' - And I click item 'Yes' for element 'Modus_Site > Careers > protection_dropdown' \ No newline at end of file + And I click item 'Yes' for element 'Modus_Site > Careers > protection_dropdown' + + + @email @automated + Scenario: Email verification + When I get email for 'moduspytestboilerplate@gmail.com' \ No newline at end of file diff --git a/main/frontend/common/step_definitions/__init__.py b/main/frontend/common/step_definitions/__init__.py index b6a15d69..91d94b52 100644 --- a/main/frontend/common/step_definitions/__init__.py +++ b/main/frontend/common/step_definitions/__init__.py @@ -10,3 +10,4 @@ from .swipe_drag_and_drop import * from .text_assertion_editing import * from .visual_comparison import * +from .email import * diff --git a/main/frontend/common/step_definitions/email.py b/main/frontend/common/step_definitions/email.py new file mode 100644 index 00000000..0ce48fc3 --- /dev/null +++ b/main/frontend/common/step_definitions/email.py @@ -0,0 +1,67 @@ +import structlog + +import base64 +import os, re +import time + +import pytest +import json + +from bs4 import BeautifulSoup + +from main.utils.email_reader import create_json + +PROJECT_DIR = os.getcwd() +test_data_dir = os.path.join(PROJECT_DIR, "test_data/files/email_data.json") + +from pytest_bdd import parsers, when, then +from main.frontend.common.helpers.selenium_generics import SeleniumGenerics + +logger = structlog.get_logger(__name__) + + +@when(parsers.re("I get email for '(?P.*)'"), + converters=dict(user_type=str)) +def check_email(user_type, selenium_generics: SeleniumGenerics): + time.sleep(5) + create_json() + from datetime import date + today = date.today() + from datetime import timedelta + + yesterday = today - timedelta(days=1) + date_today = today.strftime("%d %b %Y") + date_yesterday = yesterday.strftime("%d %b %Y") + if '0' in date_today[0]: + date_today = date_today[1:] + f = open(test_data_dir) + data = json.load(f) + for i in data: + value = i + if "Test Data" in value["Subject"] or "Test Data" in value["Subject"] and \ + "noreply@test.com" in value["From"] and date_today in value["Date"] or \ + date_yesterday in value["Date"] and user_type in value["To"]: + decoded_data = base64.b64decode(value["Message"]) + soup = BeautifulSoup(decoded_data, "lxml") + email_body = str(soup.body()[0]) + url = re.findall('https://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*, ]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', + email_body) + final_url = "" + if len(url) >= 1: + final_url = str(url[0]).replace('amp;', '') + if len(url) == 0: + decoded_data = base64.b64decode(value["Url"]) + soup = BeautifulSoup(decoded_data, "lxml") + email_body = str(soup.body()[0]) + url = re.findall('https://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*, ]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', + email_body) + new_url = '' + for j in url: + if 'Test Data' in j or 'Test Data' in j: + new_url = j + final_url = str(new_url).replace('amp;', '') + pytest.globalDict['final_url'] = final_url + selenium_generics.navigate_to_url(final_url) + + break + f.close() diff --git a/main/setup/setup_tests/test_installation_check.py b/main/setup/setup_tests/test_installation_check.py index 49f2bc5d..cba6fe8f 100644 --- a/main/setup/setup_tests/test_installation_check.py +++ b/main/setup/setup_tests/test_installation_check.py @@ -70,6 +70,7 @@ def test_check_step_definitions_folder(): assert_that(os.path.isfile("./main/frontend/common/step_definitions/click_touch_and_keyboard_actions.py")).is_true() assert_that(os.path.isfile("./main/frontend/common/step_definitions/date_time.py")).is_true() assert_that(os.path.isfile("./main/frontend/common/step_definitions/dropdowns.py")).is_true() + assert_that(os.path.isfile("./main/frontend/common/step_definitions/email.py")).is_true() assert_that(os.path.isfile("./main/frontend/common/step_definitions/attribute_assertion.py")).is_true() assert_that(os.path.isfile("./main/frontend/common/step_definitions/environment_variables.py")).is_true() assert_that(os.path.isfile("./main/frontend/common/step_definitions/excel_and_csv.py")).is_true() diff --git a/main/utils/credentials.json b/main/utils/credentials.json new file mode 100644 index 00000000..2edab942 --- /dev/null +++ b/main/utils/credentials.json @@ -0,0 +1,12 @@ +{ + "installed": { + "client_id": "443927617801-152i1i2juvvaqq7q3gniugrtoq4r89s9.apps.googleusercontent.com", + "project_id": "modus-pytest", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "refresh_token": "1//0ewd1V6v2W-BdCgYIARAAGA4SNwF-L9Ir0okYJ30QMNCV_ArrnK0aor-KhqbnrV4tu5qNmbk-pzFRAna9XANSvascVyJs2UBeQOY", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_secret": "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", + "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost", "http://localhost:8080", "http://127.0.0.1"] + } +} \ No newline at end of file diff --git a/main/utils/email_reader.py b/main/utils/email_reader.py new file mode 100644 index 00000000..74dbd744 --- /dev/null +++ b/main/utils/email_reader.py @@ -0,0 +1,119 @@ +from googleapiclient.discovery import build +from google_auth_oauthlib.flow import InstalledAppFlow +from google.auth.transport.requests import Request +import pickle +import os.path +import json +SCOPES = ['https://www.googleapis.com/auth/gmail.readonly'] +PROJECT_DIR = os.getcwd() +test_data_dir_utils = os.path.join(PROJECT_DIR, "main/utils") +test_data_dir_email = os.path.join(PROJECT_DIR, "test_data/files") +# if 'utils' in PROJECT_DIRECTORY: +# PROJECT_DIR = PROJECT_DIRECTORY.replace("utils", "test_data") +print(PROJECT_DIR) + + +def get_email(): + count = 0 + creds = None + with open(test_data_dir_utils+'/token.pickle', 'rb') as token: + creds = pickle.load(token) + with open(test_data_dir_utils+'/credentials.json', 'r') as infile: + my_data = json.load(infile) + + if not creds.valid: + try: + creds.refresh(Request()) + except: + print("Try to refresh token failed") + + if not creds or not creds.valid: + if creds and creds.expired and creds.refresh_token: + creds.refresh(Request()) + else: + flow = InstalledAppFlow.from_client_secrets_file(test_data_dir_utils+'/credentials.json', SCOPES) + creds = flow.run_local_server(port=0) + + with open(test_data_dir_utils+'/token.pickle', 'wb') as token: + pickle.dump(creds, token) + my_data['installed']['refresh_token'] = creds.refresh_token + with open(test_data_dir_utils+'/credentials.json', 'w') as outfile: + json.dump(my_data, outfile, indent=4) + + service = build('gmail', 'v1', credentials=creds) + result = service.users().messages().list(userId='me').execute() + messages = result.get('messages') + counter = 0 + for msg in messages: + if counter > 10: + break + counter = counter + 1 + txt = service.users().messages().get(userId='me', id=msg['id']).execute() + try: + payload = txt['payload'] + headers = payload['headers'] + for d in headers: + if d['name'] == 'Subject': + subject = d['value'] + if d['name'] == 'From': + sender = d['value'] + if d['name'] == 'To': + receiver = d['value'] + if d['name'] == 'Date': + date = d['value'] + part1 = payload.get('parts')[0] + part2 = payload.get('parts')[1] + data = part1['body']['data'] + data = data.replace("-", "+").replace("_", "/") + url_data = part2['body']['data'] + url_data = url_data.replace("-", "+").replace("_", "/") + count = count + 1 + if count == 15: + break + with open(test_data_dir_email + "/email_reader.txt", "a") as f: + f.write("Subject" + " : " + subject + '\n') + f.write("From" + " : " + sender + '\n') + f.write("To" + " : " + receiver + '\n') + f.write("Date" + " : " + str(date) + '\n') + f.write("Message" + " : " + str(data) + '\n') + f.write("Url" + " : " + str(url_data) + '\n') + f.write('\n') + except: + pass + + f.close() + + +def try_to_convert_to_int(val): + try: + val = int(val) + except: + pass + return val + + +def create_json(): + fp = open(test_data_dir_email + "/email_reader.txt", "w") + fp.close() + jp = open(test_data_dir_email + "/email_data.json", "w") + jp.close() + get_email() + + data, group = [], {} + with open(test_data_dir_email + "/email_reader.txt", "r") as f_in: + for line in map(str.strip, f_in): + if line == "": + if group: + data.append(group) + group = {} + else: + k, v = map(str.strip, line.split(':', maxsplit=1)) + group[k] = try_to_convert_to_int(v) if v else None + + if group: + data.append(group) + + json_data = json.dumps(data, indent=4) + with open(test_data_dir_email + "/email_data.json", "w") as f_in: + f_in.write(json_data) + f_in.close() diff --git a/main/utils/email_reader_token_generator.py b/main/utils/email_reader_token_generator.py new file mode 100644 index 00000000..3407da25 --- /dev/null +++ b/main/utils/email_reader_token_generator.py @@ -0,0 +1,110 @@ +from googleapiclient.discovery import build +from google_auth_oauthlib.flow import InstalledAppFlow +from google.auth.transport.requests import Request +import pickle +import os.path +import base64 +from bs4 import BeautifulSoup +import json + +# Define the SCOPES. If modifying it, delete the token.pickle file. +SCOPES = ['https://www.googleapis.com/auth/gmail.readonly'] + + +def getEmails(): + # Variable creds will store the user access token. + # If no valid token found, we will create one. + creds = None + + # The file token.pickle contains the user access token. + # Check if it exists + if os.path.exists('token.pickle'): + # Read the token from the file and store it in the variable creds + with open('token.pickle', 'rb') as token: + creds = pickle.load(token) + with open('credentials.json', 'r') as infile: + my_data = json.load(infile) + + # If credentials are not available or are invalid, ask the user to log in. + if not creds.valid: + try: + creds.refresh(Request()) + except: + print("Try to refresh token Failed") + + if not creds or not creds.valid: + if creds and creds.expired and creds.refresh_token: + # creds.refresh(Request()) + flow = InstalledAppFlow.from_client_secrets_file('credentials.json', SCOPES) + creds = flow.run_local_server(port=0) + else: + flow = InstalledAppFlow.from_client_secrets_file('credentials.json', SCOPES) + creds = flow.run_local_server(port=0) + + # Save the access token in token.pickle file for the next run + with open('token.pickle', 'wb') as token: + pickle.dump(creds, token) + my_data['installed']['refresh_token'] = creds.refresh_token + with open('credentials.json', 'w') as outfile: + json.dump(my_data, outfile, indent=4) + + # Connect to the Gmail API + service = build('gmail', 'v1', credentials=creds) + + # request a list of all the messages + result = service.users().messages().list(userId='me').execute() + + # We can also pass maxResults to get any number of emails. Like this: + # result = service.users().messages().list(maxResults=200, userId='me').execute() + messages = result.get('messages') + + # messages is a list of dictionaries where each dictionary contains a message id. + + # iterate through all the messages + counter = 0 + for msg in messages: + if counter > 10: + break + counter = counter + 1 + # Get the message from its id + txt = service.users().messages().get(userId='me', id=msg['id']).execute() + + # Use try-except to avoid any Errors + try: + # Get value of 'payload' from dictionary 'txt' + payload = txt['payload'] + headers = payload['headers'] + + # Look for Subject and Sender Email in the headers + for d in headers: + if d['name'] == 'Subject': + subject = d['value'] + if d['name'] == 'From': + sender = d['value'] + if d['name'] == 'To': + receiver = d['value'] + + # The Body of the message is in Encrypted format. So, we have to decode it. + # Get the data and decode it with base 64 decoder. + parts = payload.get('parts')[0] + data = parts['body']['data'] + data = data.replace("-", "+").replace("_", "/") + decoded_data = base64.b64decode(data) + + # Now, the data obtained is in lxml. So, we will parse + # it with BeautifulSoup library + soup = BeautifulSoup(decoded_data, "lxml") + body = soup.body() + # if sender == "noreply@test.com": + # print("Subject: ", subject) + # Printing the subject, sender's email and message + print("Subject: ", subject) + print("From: ", sender) + print("To: ", receiver) + print("Message: ", body) + print('\n') + except: + pass + + +getEmails() diff --git a/main/utils/token.pickle b/main/utils/token.pickle new file mode 100644 index 0000000000000000000000000000000000000000..1bcbc657dc6c876f7574101135e7e831bbe35011 GIT binary patch literal 905 zcmbW0%Wl&^6o!$w6k5bpLP9Lrz#@)sN$l>Nq)D8MTgPo0S3;w)XX2Rnmhm{LkwCCu zf#h9>7veE^0bT=#Ca7Y`SH3=kuNKpKjm!Q^iX!j=cbLG0f;(viqsO0f9ez&vfmb3=$k zZ(->~x@eC^>7|tminMecV;CypBCuUM7tGXb9-DoFmx(>DblkJrvff;Yax3m+70n5b zR^#(U2z!bEk4VR}aqf5s8P=qu>ql+B=^;Brp*6UGQrA*U?LwKWt_)|`u@;wETR4%l zK5TjRK*O%3jdiPI_PSGX*4ZVn?~Z=9iFBAl*yp&_v19==R`lC$DIf)rCf z#5bQ;thK-Q>*2E}ubv+q{$O9(m=#aKGK(n$35nlhmjWL#qj(G`$x;fOIExT0^^9T< zq;8zxl)YmGH>Wg753AMndd*#ffQg@SZX8xOJgQy@{eUAFqBsh221`MNXD|!sPQ@r5 z0fJ`)r*p6c;|bL&kJm_;)K}tprHM-Ox;ECdt|nW?x>FgdI^pAm-IsWCWV9wgBP1H| zFea73eCb4FBGat4G(u-lNj`MOS_IXpW>_njx|6)0if2u19^0&VP`cdyy7B4}7*ULN zqy3k`{cAmt5uX*Wclm6$^Ph;ee)oYJ_~p`WA}@LkNfBkKrplsRukgGqC=EJ`sIY>W z;HrrCDDO$~!dGfY_Bog&={ET+#l($E0} sGab#^PP#nT)1IMHwI2*Xc{PB*g#L}?1;7z>0$ftsAl<=Y-!g~$4Rg0g0ssI2 literal 0 HcmV?d00001 diff --git a/test_data/files/email_data.json b/test_data/files/email_data.json new file mode 100644 index 00000000..e69de29b diff --git a/test_data/files/email_reader.txt b/test_data/files/email_reader.txt new file mode 100644 index 00000000..e69de29b From 007c671635840887694c1f3be2023317adfeb643 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Wed, 10 Apr 2024 11:20:26 +0500 Subject: [PATCH 2/8] email feature added --- main/utils/credentials.json | 1 - 1 file changed, 1 deletion(-) diff --git a/main/utils/credentials.json b/main/utils/credentials.json index 2edab942..1cb54dd0 100644 --- a/main/utils/credentials.json +++ b/main/utils/credentials.json @@ -6,7 +6,6 @@ "token_uri": "https://oauth2.googleapis.com/token", "refresh_token": "1//0ewd1V6v2W-BdCgYIARAAGA4SNwF-L9Ir0okYJ30QMNCV_ArrnK0aor-KhqbnrV4tu5qNmbk-pzFRAna9XANSvascVyJs2UBeQOY", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_secret": "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", "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost", "http://localhost:8080", "http://127.0.0.1"] } } \ No newline at end of file From 7e715fba41c0e280f629926c719861c74fa958d4 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Wed, 10 Apr 2024 11:20:55 +0500 Subject: [PATCH 3/8] email feature added --- main/utils/credentials.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/main/utils/credentials.json b/main/utils/credentials.json index 1cb54dd0..cd1cadb5 100644 --- a/main/utils/credentials.json +++ b/main/utils/credentials.json @@ -1,11 +1,5 @@ { "installed": { - "client_id": "443927617801-152i1i2juvvaqq7q3gniugrtoq4r89s9.apps.googleusercontent.com", - "project_id": "modus-pytest", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://oauth2.googleapis.com/token", - "refresh_token": "1//0ewd1V6v2W-BdCgYIARAAGA4SNwF-L9Ir0okYJ30QMNCV_ArrnK0aor-KhqbnrV4tu5qNmbk-pzFRAna9XANSvascVyJs2UBeQOY", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost", "http://localhost:8080", "http://127.0.0.1"] } } \ No newline at end of file From a748af1d7c988e92005bec83e272d632842f8895 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Wed, 10 Apr 2024 11:22:16 +0500 Subject: [PATCH 4/8] email feature added --- main/utils/cred.json | 12 ++++++++++++ main/utils/credentials.json | 5 ----- main/utils/email_reader.py | 6 +++--- main/utils/email_reader_token_generator.py | 8 ++++---- 4 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 main/utils/cred.json delete mode 100644 main/utils/credentials.json diff --git a/main/utils/cred.json b/main/utils/cred.json new file mode 100644 index 00000000..2edab942 --- /dev/null +++ b/main/utils/cred.json @@ -0,0 +1,12 @@ +{ + "installed": { + "client_id": "443927617801-152i1i2juvvaqq7q3gniugrtoq4r89s9.apps.googleusercontent.com", + "project_id": "modus-pytest", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "refresh_token": "1//0ewd1V6v2W-BdCgYIARAAGA4SNwF-L9Ir0okYJ30QMNCV_ArrnK0aor-KhqbnrV4tu5qNmbk-pzFRAna9XANSvascVyJs2UBeQOY", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_secret": "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", + "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost", "http://localhost:8080", "http://127.0.0.1"] + } +} \ No newline at end of file diff --git a/main/utils/credentials.json b/main/utils/credentials.json deleted file mode 100644 index cd1cadb5..00000000 --- a/main/utils/credentials.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "installed": { - "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost", "http://localhost:8080", "http://127.0.0.1"] - } -} \ No newline at end of file diff --git a/main/utils/email_reader.py b/main/utils/email_reader.py index 74dbd744..023f50a4 100644 --- a/main/utils/email_reader.py +++ b/main/utils/email_reader.py @@ -18,7 +18,7 @@ def get_email(): creds = None with open(test_data_dir_utils+'/token.pickle', 'rb') as token: creds = pickle.load(token) - with open(test_data_dir_utils+'/credentials.json', 'r') as infile: + with open(test_data_dir_utils+'/cred.json', 'r') as infile: my_data = json.load(infile) if not creds.valid: @@ -31,13 +31,13 @@ def get_email(): if creds and creds.expired and creds.refresh_token: creds.refresh(Request()) else: - flow = InstalledAppFlow.from_client_secrets_file(test_data_dir_utils+'/credentials.json', SCOPES) + flow = InstalledAppFlow.from_client_secrets_file(test_data_dir_utils+'/cred.json', SCOPES) creds = flow.run_local_server(port=0) with open(test_data_dir_utils+'/token.pickle', 'wb') as token: pickle.dump(creds, token) my_data['installed']['refresh_token'] = creds.refresh_token - with open(test_data_dir_utils+'/credentials.json', 'w') as outfile: + with open(test_data_dir_utils+'/cred.json', 'w') as outfile: json.dump(my_data, outfile, indent=4) service = build('gmail', 'v1', credentials=creds) diff --git a/main/utils/email_reader_token_generator.py b/main/utils/email_reader_token_generator.py index 3407da25..7b458627 100644 --- a/main/utils/email_reader_token_generator.py +++ b/main/utils/email_reader_token_generator.py @@ -22,7 +22,7 @@ def getEmails(): # Read the token from the file and store it in the variable creds with open('token.pickle', 'rb') as token: creds = pickle.load(token) - with open('credentials.json', 'r') as infile: + with open('cred.json', 'r') as infile: my_data = json.load(infile) # If credentials are not available or are invalid, ask the user to log in. @@ -35,17 +35,17 @@ def getEmails(): if not creds or not creds.valid: if creds and creds.expired and creds.refresh_token: # creds.refresh(Request()) - flow = InstalledAppFlow.from_client_secrets_file('credentials.json', SCOPES) + flow = InstalledAppFlow.from_client_secrets_file('cred.json', SCOPES) creds = flow.run_local_server(port=0) else: - flow = InstalledAppFlow.from_client_secrets_file('credentials.json', SCOPES) + flow = InstalledAppFlow.from_client_secrets_file('cred.json', SCOPES) creds = flow.run_local_server(port=0) # Save the access token in token.pickle file for the next run with open('token.pickle', 'wb') as token: pickle.dump(creds, token) my_data['installed']['refresh_token'] = creds.refresh_token - with open('credentials.json', 'w') as outfile: + with open('cred.json', 'w') as outfile: json.dump(my_data, outfile, indent=4) # Connect to the Gmail API From 20f7f7aed8264634eaabe2150ebc291dd48340a8 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Wed, 10 Apr 2024 11:23:10 +0500 Subject: [PATCH 5/8] email feature added --- main/utils/cred.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/main/utils/cred.json b/main/utils/cred.json index 2edab942..553767df 100644 --- a/main/utils/cred.json +++ b/main/utils/cred.json @@ -1,12 +1,9 @@ { "installed": { - "client_id": "443927617801-152i1i2juvvaqq7q3gniugrtoq4r89s9.apps.googleusercontent.com", "project_id": "modus-pytest", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", - "refresh_token": "1//0ewd1V6v2W-BdCgYIARAAGA4SNwF-L9Ir0okYJ30QMNCV_ArrnK0aor-KhqbnrV4tu5qNmbk-pzFRAna9XANSvascVyJs2UBeQOY", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_secret": "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", "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost", "http://localhost:8080", "http://127.0.0.1"] } } \ No newline at end of file From 944e4f6cae3ef9f3f558c9ba2c1faf1cbba1dce7 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Wed, 10 Apr 2024 11:23:26 +0500 Subject: [PATCH 6/8] email feature added --- main/utils/cred.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/main/utils/cred.json b/main/utils/cred.json index 553767df..e69de29b 100644 --- a/main/utils/cred.json +++ b/main/utils/cred.json @@ -1,9 +0,0 @@ -{ - "installed": { - "project_id": "modus-pytest", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://oauth2.googleapis.com/token", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost", "http://localhost:8080", "http://127.0.0.1"] - } -} \ No newline at end of file From 957179d109d9729ea73cca9875becbf64c33815d Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Wed, 10 Apr 2024 11:26:12 +0500 Subject: [PATCH 7/8] email feature added --- main/utils/cred.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/main/utils/cred.json b/main/utils/cred.json index e69de29b..2edab942 100644 --- a/main/utils/cred.json +++ b/main/utils/cred.json @@ -0,0 +1,12 @@ +{ + "installed": { + "client_id": "443927617801-152i1i2juvvaqq7q3gniugrtoq4r89s9.apps.googleusercontent.com", + "project_id": "modus-pytest", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "refresh_token": "1//0ewd1V6v2W-BdCgYIARAAGA4SNwF-L9Ir0okYJ30QMNCV_ArrnK0aor-KhqbnrV4tu5qNmbk-pzFRAna9XANSvascVyJs2UBeQOY", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_secret": "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", + "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost", "http://localhost:8080", "http://127.0.0.1"] + } +} \ No newline at end of file From b02920ae05fd363d222495ad604f37c90a0b4a08 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Wed, 10 Apr 2024 11:29:05 +0500 Subject: [PATCH 8/8] email feature added --- main/utils/cred.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/utils/cred.json b/main/utils/cred.json index 2edab942..590a29e2 100644 --- a/main/utils/cred.json +++ b/main/utils/cred.json @@ -1,12 +1,12 @@ { "installed": { - "client_id": "443927617801-152i1i2juvvaqq7q3gniugrtoq4r89s9.apps.googleusercontent.com", + "client_id": "44392rcontent.com", "project_id": "modus-pytest", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", - "refresh_token": "1//0ewd1V6v2W-BdCgYIARAAGA4SNwF-L9Ir0okYJ30QMNCV_ArrnK0aor-KhqbnrV4tu5qNmbk-pzFRAna9XANSvascVyJs2UBeQOY", + "refresh_token": "1//0ewd1ANSvascVyJs2UBeQOY", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_secret": "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", + "client_secret": "MGS3sWe", "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost", "http://localhost:8080", "http://127.0.0.1"] } } \ No newline at end of file