PopSignerMixin(
*, kind, header_name, include_query=False, **data
)
Bases: IPoPSigner
, BaseModel
Common helpers for IPopSigning
implementations.
Source code in swarmauri_base/pop/PopSignerMixin.py
28
29
30
31
32
33
34
35
36
37
38
39 | def __init__(
self,
*,
kind: PoPKind,
header_name: str,
include_query: bool = False,
**data,
) -> None:
super().__init__(**data)
self._kind = kind
self._header_name = header_name
self._include_query = include_query
|
model_config
class-attribute
instance-attribute
model_config = ConfigDict(arbitrary_types_allowed=True)
Source code in swarmauri_base/pop/PopSignerMixin.py
| def header_name(self) -> str:
return self._header_name
|
ath_from_token
Source code in swarmauri_base/pop/PopSignerMixin.py
| def ath_from_token(self, token: bytes | str) -> str:
if isinstance(token, str):
token_bytes = token.encode("utf-8")
else:
token_bytes = token
return sha256_b64u(token_bytes)
|