pub trait ServerPskIdentityKeyProvider<'a>: Debug {
// Required method
fn key_for_identity(
&self,
identity: &[u8],
session: &CoapServerSession<'_>,
) -> Option<PskKey<'a>>;
}
Expand description
Trait for types that can provide pre-shared keys for a key identity given by a client to a server.
Required Methods§
Sourcefn key_for_identity(
&self,
identity: &[u8],
session: &CoapServerSession<'_>,
) -> Option<PskKey<'a>>
fn key_for_identity( &self, identity: &[u8], session: &CoapServerSession<'_>, ) -> Option<PskKey<'a>>
Provides the key for the key identity
given by the client that is connected through
session
, or None
if the identity unacceptable or no key is available.