NatsUserPassword
faststream.nats.NatsUserPassword #
NatsUserPassword(
username: str,
password: str,
*,
ssl_context: SSLContext | None = None,
use_ssl: bool | None = None,
tls_hostname: str | None = None,
tls_handshake_first: bool = False,
)
Bases: NatsSecurity
NATS username and password authentication.
Source code in faststream/nats/security.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
get_requirement #
get_requirement() -> list[dict[str, Any]]
Get the AsyncAPI requirement for NATS user/password authentication.
Source code in faststream/nats/security.py
121 122 123 124 | |
get_schema #
get_schema() -> dict[str, dict[str, Any]]
Get the AsyncAPI schema for NATS user/password authentication.
Source code in faststream/nats/security.py
126 127 128 129 | |