chore: import MCTF services
- Added all seven issued service trees without omissions. - Preserved the supplied runtime configuration, binaries, and assets.
This commit is contained in:
commit
13f936bee9
1222 files changed
+21280
No files matched your search
+10
@@ -0,0 +1,10 @@
|
||||
import re
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
|
||||
LIFETIME = timedelta(seconds=60)
|
||||
AUTH_LIFETIME = timedelta(hours=12)
|
||||
AUTH_AUDIENCE = "chrome-ledger"
|
||||
|
||||
HEX_CHALLENGE = re.compile(r"[0-9a-fA-F]{64}")
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
class LedgerError(Exception):
|
||||
def __init__(self, status, message):
|
||||
super().__init__(message)
|
||||
self.status = status
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
import unicodedata
|
||||
|
||||
from datetime import UTC, datetime
|
||||
|
||||
|
||||
def utc_now():
|
||||
return datetime.now(UTC)
|
||||
|
||||
def account_namespace(username):
|
||||
return unicodedata.normalize("NFKC", username).casefold()
|
||||
|
||||
def valid_text(value, minimum, maximum):
|
||||
if not isinstance(value, str):
|
||||
return False
|
||||
if len(value) < minimum or len(value) > maximum:
|
||||
return False
|
||||
return value.isascii()
|
||||
Reference in new issue
Block a user