1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use super::*;
impl<IO, Ctx> Authenticator<IO, Ctx>
where
IO: HttpIo,
Ctx: BorrowMutAuthenticatorContext,
{
pub async fn create(io: IO, context: Ctx) -> Result<Self, AuthenticatorError> {
let (http_conn_api, http_conn_running) = Self::http_handshake(io).await?;
let authenticator = Self {
context,
http_conn_api,
http_conn_running,
};
Ok(authenticator)
}
}