ForgeFlux/src/forge/auth/adapter/out/forge/forgejo/mod.rs
Aravinth Manivannan 60885319f7
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
chore: lints
2024-05-05 22:29:25 +05:30

33 lines
583 B
Rust

use url::Url;
pub mod oauth_auth_req_uri;
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct Forgejo {
url: Url,
client_id: String,
client_secret: String,
}
impl Forgejo {
pub fn new(url: Url, client_id: String, client_secret: String) -> Self {
Self {
url,
client_id,
client_secret,
}
}
pub fn url(&self) -> &Url {
&self.url
}
pub fn client_id(&self) -> &str {
&self.client_id
}
pub fn client_secret(&self) -> &str {
&self.client_secret
}
}