NatsToken
faststream.nats.NatsToken #
NatsToken(
token: str | Callable[[], str],
*,
ssl_context: SSLContext | None = None,
use_ssl: bool | None = None,
tls_hostname: str | None = None,
tls_handshake_first: bool = False,
)
Bases: NatsSecurity
NATS token authentication.
Source code in faststream/nats/security.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
get_requirement #
get_requirement() -> list[dict[str, Any]]
Get the AsyncAPI requirement for NATS token authentication.
Source code in faststream/nats/security.py
79 80 81 82 | |
get_schema #
get_schema() -> dict[str, dict[str, Any]]
Get the AsyncAPI schema for NATS token authentication.
Source code in faststream/nats/security.py
84 85 86 87 88 89 90 91 92 93 94 | |