1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-06-30 11:14:42 +02:00

Merge branch 'jjlin-webauthn-origin' into main

Dieser Commit ist enthalten in:
Daniel García 2021-09-06 17:17:04 +02:00
Commit d5ed2ce6df
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: FC8A7D14C3CD543A

Datei anzeigen

@ -22,12 +22,14 @@ pub fn routes() -> Vec<Route> {
struct WebauthnConfig {
url: String,
origin: String,
rpid: String,
}
impl WebauthnConfig {
fn load() -> Webauthn<Self> {
let domain = CONFIG.domain();
let domain_origin = CONFIG.domain_origin();
Webauthn::new(Self {
rpid: reqwest::Url::parse(&domain)
.map(|u| u.domain().map(str::to_owned))
@ -35,6 +37,7 @@ impl WebauthnConfig {
.flatten()
.unwrap_or_default(),
url: domain,
origin: domain_origin,
})
}
}
@ -45,7 +48,7 @@ impl webauthn_rs::WebauthnConfig for WebauthnConfig {
}
fn get_origin(&self) -> &str {
&self.url
&self.origin
}
fn get_relying_party_id(&self) -> &str {