diff --git a/.gitignore b/.gitignore index 2cb02c26c0..4195785a97 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ vendor.tar.* orca/example_profiles/small/orca-edited.toml docs/ kanidm_unix_int/pam_tester/Cargo.lock + +# VSCODE +/.vscode \ No newline at end of file diff --git a/designs/idm_rest_layout.rst b/designs/idm_rest_layout.rst index 65f3bad341..b762abc22b 100644 --- a/designs/idm_rest_layout.rst +++ b/designs/idm_rest_layout.rst @@ -145,6 +145,7 @@ account GET -> let's the radius server get all required details for radius to work +TODO(mea): remove self ==== diff --git a/kanidm_client/src/lib.rs b/kanidm_client/src/lib.rs index d22c928435..08c3492725 100644 --- a/kanidm_client/src/lib.rs +++ b/kanidm_client/src/lib.rs @@ -1130,9 +1130,9 @@ impl KanidmClient { self.perform_get_request("/v1/auth/valid").await } + // TODO(mea): self -> whoami? pub async fn whoami(&self) -> Result, ClientError> { - let whoami_dest = [self.addr.as_str(), "/v1/self"].concat(); - // format!("{}/v1/self", self.addr); + let whoami_dest = [self.addr.as_str(), "/v1/whoami"].concat(); debug!("{:?}", whoami_dest); let response = self.client.get(whoami_dest.as_str()); @@ -1521,7 +1521,7 @@ impl KanidmClient { } } - pub async fn idm_account_primary_credential_complete_webuthn_registration( + pub async fn idm_account_primary_credential_complete_webauthn_registration( &self, id: &str, rego: RegisterPublicKeyCredential, diff --git a/kanidmd/score/src/https/mod.rs b/kanidmd/score/src/https/mod.rs index fcdbd95c38..bb45e64b2e 100644 --- a/kanidmd/score/src/https/mod.rs +++ b/kanidmd/score/src/https/mod.rs @@ -11,8 +11,8 @@ use kanidm::prelude::*; use kanidm::status::StatusActor; use serde::Serialize; -use std::path::PathBuf; use std::fs::canonicalize; +use std::path::PathBuf; use std::str::FromStr; use uuid::Uuid; @@ -366,7 +366,6 @@ pub fn create_https_server( qe_w_ref: &'static QueryServerWriteV1, qe_r_ref: &'static QueryServerReadV1, ) -> Result<(), ()> { - let jws_validator = jws_signer.get_validator().map_err(|e| { error!(?e, "Failed to get jws validator"); })?; @@ -401,7 +400,6 @@ pub fn create_https_server( // If we are no-ui, we remove this. if !matches!(role, ServerRole::WriteReplicaNoUI) { - let pkg_path = PathBuf::from(env!("KANIDM_WEB_UI_PKG_PATH")); if !pkg_path.exists() { eprintln!( @@ -555,7 +553,8 @@ pub fn create_https_server( .post(oauth2_id_scopemap_post) .delete(oauth2_id_scopemap_delete); - let mut self_route = appserver.at("/v1/self"); + // TODO(mea): self -> whoami? + let mut self_route = appserver.at("/v1/whoami"); self_route.at("/").get(whoami); self_route.at("/_attr/:attr").get(do_nothing); diff --git a/kanidmd/score/tests/proto_v1_test.rs b/kanidmd/score/tests/proto_v1_test.rs index 5023474702..b4b53c1474 100644 --- a/kanidmd/score/tests/proto_v1_test.rs +++ b/kanidmd/score/tests/proto_v1_test.rs @@ -1083,7 +1083,7 @@ async fn test_server_rest_webauthn_auth_lifecycle() { // Enroll the cred after signing. rsclient - .idm_account_primary_credential_complete_webuthn_registration( + .idm_account_primary_credential_complete_webauthn_registration( "demo_account", rego, sessionid, @@ -1106,7 +1106,7 @@ async fn test_server_rest_webauthn_auth_lifecycle() { // Enroll the cred after signing. rsclient - .idm_account_primary_credential_complete_webuthn_registration( + .idm_account_primary_credential_complete_webauthn_registration( "demo_account", rego, sessionid, @@ -1196,7 +1196,7 @@ async fn test_server_rest_webauthn_mfa_auth_lifecycle() { // Enroll the cred after signing. rsclient - .idm_account_primary_credential_complete_webuthn_registration( + .idm_account_primary_credential_complete_webauthn_registration( "demo_account", rego, sessionid,