NatsJWT
faststream.nats.security.NatsJWT #
NatsJWT(
jwt_cb: Callable[[], bytes | bytearray],
signature_cb: Callable[[str], bytes],
*,
ssl_context: SSLContext | None = None,
use_ssl: bool | None = None,
tls_hostname: str | None = None,
tls_handshake_first: bool = False,
)
Bases: NatsSecurity
NATS user JWT authentication with NKey challenge signing.
Source code in faststream/nats/security.py
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | |
get_requirement #
get_requirement() -> list[dict[str, Any]]
Get the AsyncAPI requirement for NATS JWT authentication.
Source code in faststream/nats/security.py
359 360 361 362 | |
get_schema #
get_schema() -> dict[str, dict[str, Any]]
Get the AsyncAPI schema for NATS JWT authentication.
Source code in faststream/nats/security.py
364 365 366 367 368 369 370 371 372 373 374 375 376 | |