feat(downloader): add rqbit impl
This commit is contained in:
@@ -35,7 +35,7 @@ use crate::{app::AppContextTrait, errors::RecorderError, models::auth::AuthType}
|
||||
|
||||
pub struct OidcHttpClient(pub Arc<HttpClient>);
|
||||
|
||||
impl<'a> Deref for OidcHttpClient {
|
||||
impl Deref for OidcHttpClient {
|
||||
type Target = HttpClient;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
@@ -170,8 +170,8 @@ pub struct OidcAuthService {
|
||||
}
|
||||
|
||||
impl OidcAuthService {
|
||||
pub async fn build_authorization_request<'a>(
|
||||
&'a self,
|
||||
pub async fn build_authorization_request(
|
||||
&self,
|
||||
redirect_uri: &str,
|
||||
) -> Result<OidcAuthRequest, AuthError> {
|
||||
let oidc_provider_client = OidcHttpClient(self.oidc_provider_client.clone());
|
||||
@@ -247,8 +247,8 @@ impl OidcAuthService {
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
pub async fn extract_authorization_request_callback<'a>(
|
||||
&'a self,
|
||||
pub async fn extract_authorization_request_callback(
|
||||
&self,
|
||||
query: OidcAuthCallbackQuery,
|
||||
) -> Result<OidcAuthCallbackPayload, AuthError> {
|
||||
let oidc_http_client = OidcHttpClient(self.oidc_provider_client.clone());
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
pub mod app_error;
|
||||
pub mod ext;
|
||||
pub mod response;
|
||||
|
||||
pub use app_error::{RecorderError, RecorderResult};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{fmt::Debug, ops::Deref};
|
||||
|
||||
use fetch::{FetchError, HttpClient, HttpClientTrait, client::HttpClientCookiesAuth};
|
||||
use fetch::{HttpClient, HttpClientTrait, client::HttpClientCookiesAuth};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use url::Url;
|
||||
|
||||
@@ -24,7 +24,6 @@ impl Debug for MikanAuthSecrecy {
|
||||
impl MikanAuthSecrecy {
|
||||
pub fn into_cookie_auth(self, url: &Url) -> Result<HttpClientCookiesAuth, RecorderError> {
|
||||
HttpClientCookiesAuth::from_cookies(&self.cookie, url, self.user_agent)
|
||||
.map_err(FetchError::from)
|
||||
.map_err(RecorderError::from)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user