Add RP name in webauthn
This commit is contained in:
parent
9f0913fe17
commit
58b6bd7568
@ -6,7 +6,7 @@ use uuid::Uuid;
|
|||||||
use webauthn_rs::{Webauthn, WebauthnBuilder};
|
use webauthn_rs::{Webauthn, WebauthnBuilder};
|
||||||
use webauthn_rs::prelude::{CreationChallengeResponse, Passkey, PublicKeyCredential, RegisterPublicKeyCredential, RequestChallengeResponse};
|
use webauthn_rs::prelude::{CreationChallengeResponse, Passkey, PublicKeyCredential, RegisterPublicKeyCredential, RequestChallengeResponse};
|
||||||
|
|
||||||
use crate::constants::{WEBAUTHN_LOGIN_CHALLENGE_EXPIRE, WEBAUTHN_REGISTER_CHALLENGE_EXPIRE};
|
use crate::constants::{APP_NAME, WEBAUTHN_LOGIN_CHALLENGE_EXPIRE, WEBAUTHN_REGISTER_CHALLENGE_EXPIRE};
|
||||||
use crate::data::app_config::AppConfig;
|
use crate::data::app_config::AppConfig;
|
||||||
use crate::data::crypto_wrapper::CryptoWrapper;
|
use crate::data::crypto_wrapper::CryptoWrapper;
|
||||||
use crate::data::user::{User, UserID};
|
use crate::data::user::{User, UserID};
|
||||||
@ -60,6 +60,7 @@ impl WebAuthManager {
|
|||||||
&url::Url::parse(&conf.website_origin)
|
&url::Url::parse(&conf.website_origin)
|
||||||
.expect("Failed to parse configuration origin!"))
|
.expect("Failed to parse configuration origin!"))
|
||||||
.expect("Invalid Webauthn configuration")
|
.expect("Invalid Webauthn configuration")
|
||||||
|
.rp_name(APP_NAME)
|
||||||
.build()
|
.build()
|
||||||
.expect("Failed to build webauthn")
|
.expect("Failed to build webauthn")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user