Struct sage_mqtt::Authentication [−][src]
Expand description
By default, Connect
packets provide optional user_name
and password
fields which can be used to provide basic authentication.
Enhanced authentication can be provided by using an Authentication
structure which will initialize a challenge / response style authentication.
Ii might imply the exchange of several Auth
with reason code
ContinueAuthentication
until eventually one is send with either Success
or any relevant error code and, in that case, close the connection.
The authentication method which is used as an agreement on how authentication
exchanges will perform. Authentication data can be sent at any moment
according to this agreement.
See the section 4.12 (Enhanced Authentication) of the MQTT 5 specifications
for examples.
Fields
method: String
Specifies the authentication method, such as “SCRAM-SHA-1” or “GS2-KRB5”.
The actual support for a given authentication method is up to the server.
If the server does not support the requested method, it will respond
with a Connack
packet with reason code NotAuthorized
or
BadAuthenticationMethod
and close the connection.
data: Vec<u8>
Authentication may contains data. The content depends on the authentication method.
Implementations
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Authentication
impl Send for Authentication
impl Sync for Authentication
impl Unpin for Authentication
impl UnwindSafe for Authentication
Blanket Implementations
Mutably borrows from an owned value. Read more