Weglot for Datasnipper - updated templates. Approved to move Walmart screenshots scripts to a cloud host. Need to re-write it in playwright

This commit is contained in:
Norm Rasmussen
2024-03-27 22:17:31 -04:00
parent 30f5cfd5e4
commit ee29257e17
7 changed files with 46 additions and 22 deletions

View File

@ -17,8 +17,8 @@ def find_pictures(currentdir):
def split_resources(files, currentdir):
try:
resource_title = files[0]
resource_title = resource_title[:-6]
resource_title = files[0][:-6]
# resource_title = resource_title[:-6]
files.sort()
new_list = []
for file in files:

View File

@ -8,9 +8,7 @@ const apiKey = "6hUfJdAartHTHhHc0WIRZYPWe"
// Luminate Production ^
const uid = "/\?uid\=7beg87y4-fh24-4929-3rt5-24kdn87s5241";
const groupIds = [
'855e2704-fd95-456f-a4eb-ce31c13b3072',
'ba23909e-49fd-4458-81bc-99e9fe35faee',
'efdfb1a5-58c8-4fd4-a31c-60946e73b6ed',
'db8120fa-2107-4d69-b557-47509cfb594c',
]
const getAllGroups = async (num) => {

View File

@ -0,0 +1,23 @@
import base64
import hashlib
import hmac
import json
import logging
from typing import Any
def verify_northpass_authorization(auth_token: str, request_data: dict) -> bool:
"""
Verifies that the authorization token is valid.
Args:
auth_token: The authorization token provided from Northpass
request_data: The data provided by Northpass
Returns: True if the authorization token is valid or False if not
"""
asm_northpass_secret = "EXAMPLE-SECRET".encode("utf-8")
encoded_body = json.dumps(request_data.__dict__, separators=(",", ":")).encode("utf-8")
asm_hash = hmac.new(key=asm_northpass_secret, msg=encoded_body, digestmod=hashlib.sha256).digest()
return auth_token == base64.b64encode(asm_hash).decode("utf-8")