Skip to content

Commit 85d86dc

Browse files
🤖 cargo-fmt auto-update
1 parent 4cd9b48 commit 85d86dc

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

src/internet_identity/src/main.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -807,12 +807,10 @@ mod openid_api {
807807
arg: OpenIDRegFinishArg,
808808
) -> Result<IdRegFinishResult, IdRegFinishError> {
809809
match verify(&arg.jwt, &arg.salt) {
810-
Ok(_) => {
811-
registration::registration_flow_v2::identity_registration_finish(
812-
CreateIdentityData::OpenID(arg),
813-
)
814-
},
815-
Err(err) => Err(IdRegFinishError::InvalidAuthnMethod(err))
810+
Ok(_) => registration::registration_flow_v2::identity_registration_finish(
811+
CreateIdentityData::OpenID(arg),
812+
),
813+
Err(err) => Err(IdRegFinishError::InvalidAuthnMethod(err)),
816814
}
817815
}
818816

src/internet_identity/tests/integration/openid.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ use candid::Principal;
77
use canister_tests::{api::internet_identity as api, framework::*};
88
use identity_jose::{jwk::Jwk, jws::Decoder};
99
use internet_identity_interface::internet_identity::types::{
10-
AuthnMethod, AuthnMethodData, AuthnMethodProtection, AuthnMethodPurpose, AuthnMethodSecuritySettings, CaptchaConfig, InternetIdentityInit, OpenIdConfig, OpenIdCredentialKey, OpenIdDelegationError, PublicKeyAuthn
10+
AuthnMethod, AuthnMethodData, AuthnMethodProtection, AuthnMethodPurpose,
11+
AuthnMethodSecuritySettings, CaptchaConfig, InternetIdentityInit, OpenIdConfig,
12+
OpenIdCredentialKey, OpenIdDelegationError, PublicKeyAuthn,
1113
};
1214
use pocket_ic::common::rest::{CanisterHttpReply, CanisterHttpResponse, MockCanisterHttpResponse};
1315
use pocket_ic::{CallError, PocketIc};
@@ -235,9 +237,13 @@ fn cannot_register_with_faulty_jwt() {
235237

236238
// Create identity - this will panic if it doesn't work. It should panic as we are using a faulty jwt.
237239

238-
let _identity_number =
239-
create_identity_with_openid_credential(&env, canister_id, &faulty_jwt, &salt, test_principal);
240-
240+
let _identity_number = create_identity_with_openid_credential(
241+
&env,
242+
canister_id,
243+
&faulty_jwt,
244+
&salt,
245+
test_principal,
246+
);
241247
}
242248

243249
static CLIENT_ID: &str = "360587991668-63bpc1gngp1s5gbo1aldal4a50c1j0bb.apps.googleusercontent.com";

0 commit comments

Comments
 (0)