NatsNKey
faststream.nats.NatsNKey #
NatsNKey(
seed_file: str | Path,
*,
ssl_context: SSLContext | None = None,
use_ssl: bool | None = None,
tls_hostname: str | None = None,
tls_handshake_first: bool = False,
)
Bases: NatsSecurity
NATS NKey challenge-response authentication.
Source code in faststream/nats/security.py
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | |
get_requirement #
get_requirement() -> list[dict[str, Any]]
Get the AsyncAPI requirement for NATS NKey authentication.
Source code in faststream/nats/security.py
270 271 272 273 | |
get_schema #
get_schema() -> dict[str, dict[str, Any]]
Get the AsyncAPI schema for NATS NKey authentication.
Source code in faststream/nats/security.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 | |
from_file classmethod #
from_file(
seed_file: str | Path,
*,
ssl_context: SSLContext | None = None,
use_ssl: bool | None = None,
tls_hostname: str | None = None,
tls_handshake_first: bool = False,
) -> Self
Load a NATS NKey seed file.
Source code in faststream/nats/security.py
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | |
from_seed classmethod #
from_seed(
seed: str,
*,
ssl_context: SSLContext | None = None,
use_ssl: bool | None = None,
tls_hostname: str | None = None,
tls_handshake_first: bool = False,
) -> Self
Use a raw NATS NKey seed.
Source code in faststream/nats/security.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | |