p
Size: a a a
p
FL
FL
ΑZ
p
ΑZ
ΑZ
let auth = HttpAuthentication::bearer(move |req, c| {
let auth_client = auth_client.clone();
let env_config = env_config.clone();
async move {
let user_model = auth_client.get_user_info(&c).await?;
let req = enrich_di(req, &c, user_model, env_config);
Ok(req)
}
});
self.service(resource(path).route(route).wrap(auth))
ΑZ
let req = enrich_di(req, &c, user_model, env_config);по сути и есть диай. Его бы куда-нибудь вынести по-красивому чтобы было
ΑZ
ΑZ
CD
p
p
p
p
FL
H
S
FL
p