Struct custodian_password::ClientLogin [−][src]
pub struct ClientLogin { /* fields omitted */ }
Expand description
Holds the state of a login process. See login
.
Implementations
Returns the ClientConfig
associated with this ClientLogin
.
pub fn login<P: AsRef<[u8]>>(
config: ClientConfig,
file: Option<ClientFile>,
password: P
) -> Result<(Self, LoginRequest)>
pub fn login<P: AsRef<[u8]>>(
config: ClientConfig,
file: Option<ClientFile>,
password: P
) -> Result<(Self, LoginRequest)>
Starts the login process. The returned LoginRequest
has to be send
to the server to drive the login process. See
ServerLogin::login()
.
If a ClientFile
was stored during registration, it can validate the
server when passed.
Errors
Error::Config
ifClientConfig
andClientFile
were not created with the sameConfig
Error::ConfigPublicKey
ifPublicKey
inClientConfig
andClientFile
don’t matchError::Opaque
on internal OPAQUE error
pub fn finish(
self,
response: LoginResponse
) -> Result<(ClientFile, LoginFinalization, ExportKey)>
pub fn finish(
self,
response: LoginResponse
) -> Result<(ClientFile, LoginFinalization, ExportKey)>
Finishes the login process. The returned LoginFinalization
has to be
send back to the server to finish the login process.
ClientFile
can be used to validate the server during the next login.
See login()
.
ExportKey
can be used to encrypt data and store it on safely on
the server. See ExportKey
for more details.
Errors
Error::Config
ifClientLogin
andLoginResponse
were not created with the sameConfig
Error::Credentials
if credentials don’t matchError::InvalidServer
if the public key given inlogin()
does not match the servers public keyError::Opaque
on internal OPAQUE error
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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 ClientLogin
impl Send for ClientLogin
impl Sync for ClientLogin
impl Unpin for ClientLogin
impl UnwindSafe for ClientLogin
Blanket Implementations
Mutably borrows from an owned value. Read more