SASLPlaintext
faststream.security.SASLPlaintext #
SASLPlaintext(
username: str,
password: str,
ssl_context: Optional[SSLContext] = None,
use_ssl: Optional[bool] = None,
)
Bases: BaseSecurity
Security configuration for SASL/PLAINTEXT authentication.
This class defines security configuration for SASL/PLAINTEXT authentication, which includes a username and password.
PARAMETER | DESCRIPTION |
---|---|
username | The username for authentication. TYPE: |
password | The password for authentication. TYPE: |
ssl_context | An SSLContext object for SSL encryption. If None, SSL encryption is disabled. TYPE: |
use_ssl | A boolean indicating whether to use SSL encryption. Defaults to True. |
METHOD | DESCRIPTION |
---|---|
get_requirement | Get the security requirements for SASL/PLAINTEXT authentication. |
get_schema | Get the security schema for SASL/PLAINTEXT authentication. |
Source code in faststream/security.py
get_requirement #
Get the security requirements for SASL/PLAINTEXT authentication.
RETURNS | DESCRIPTION |
---|---|
List[AnyDict] | List[AnyDict]: A list of dictionaries representing security requirements. |
Last update: 2023-11-13