MCPcopy Create free account
hub / github.com/dbunt1tled/python-fast-api / __init__

Method __init__

src/core/service/hash_service.py:17–24  ·  view source on GitHub ↗
(self, cfg: Settings)

Source from the content-addressed store, hash-verified

15
16class HashService:
17 def __init__(self, cfg: Settings) -> None:
18 self.cfg = cfg
19 self.jwt_public_key = base64.b64decode(cfg.jwt_public_key).decode("utf-8")
20 self.jwt_private_key = base64.b64decode(cfg.jwt_private_key).decode("utf-8")
21 self.jwt_algorithm = cfg.jwt_algorithm
22 if self.jwt_algorithm is None or self.jwt_algorithm == "":
23 self.jwt_algorithm = "RS256"
24 self.hasher = PasswordHasher()
25
26 def verify_x_api_key(self, key: str) -> bool:
27 return self.verify_hash(key, self.cfg.x_api_key)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected