Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
beltram committed Jan 15, 2024
1 parent 4dbe0f6 commit 96088a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions e2e-identity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ impl RustyE2eIdentity {
let kp = ES384KeyPair::generate();
(kp.to_pem()?.into(), kp.public_key().try_into_jwk()?)
}
}
.into();
};
// drop the private immediately since it already has been copied
raw_sign_key.zeroize();
Ok(Self {
Expand Down
4 changes: 2 additions & 2 deletions e2e-identity/tests/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ mod dpop_challenge {
device_id: 42,
..test.sub.clone()
};
let htu: Htu = dpop_chall.target.unwrap().try_into().unwrap();
let htu: Htu = dpop_chall.target.unwrap().into();
let backend_nonce: BackendNonce = nonce_r.lock().unwrap().clone().unwrap();
let acme_nonce: AcmeNonce = dpop_chall.token.as_str().into();
let handle = Handle::from(test.handle.as_str())
Expand Down Expand Up @@ -593,7 +593,7 @@ mod dpop_challenge {
get_access_token: Box::new(|test, (dpop_chall, _)| {
Box::pin(async move {
let client_id = test.sub.clone();
let htu: Htu = dpop_chall.target.unwrap().try_into().unwrap();
let htu: Htu = dpop_chall.target.unwrap().into();
let backend_nonce: BackendNonce = nonce_r.lock().unwrap().clone().unwrap();
let handle = Handle::from(test.handle.as_str())
.try_to_qualified(&client_id.domain)
Expand Down
10 changes: 3 additions & 7 deletions e2e-identity/tests/utils/fmk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ impl<'a> E2eTest<'a> {
use oauth2::TokenResponse as _;
let dex_pk = self.fetch_dex_public_key().await;
let access_token = oauth_token_response.access_token().secret();
self.display_token("OAuth Access token", &access_token, None, &dex_pk);
self.display_token("OAuth Access token", access_token, None, &dex_pk);

if let Some(refresh_token) = oauth_token_response.refresh_token() {
self.display_token("OAuth Refresh token", refresh_token.secret(), None, &dex_pk);
Expand Down Expand Up @@ -637,11 +637,7 @@ impl<'a> E2eTest<'a> {
// Authorization Server redirects to login prompt
let resp = self.client.execute(authz_req).await.unwrap();

let cookies = resp
.cookies()
.into_iter()
.map(|c| format!("{}={}", c.name(), c.value()))
.join("; ");
let cookies = resp.cookies().map(|c| format!("{}={}", c.name(), c.value())).join("; ");

let html = resp.text().await.unwrap();
self.display_resp(Actor::IdentityProvider, Actor::WireClient, None);
Expand Down Expand Up @@ -700,7 +696,7 @@ impl<'a> E2eTest<'a> {
use oauth2::TokenResponse as _;
let dex_pk = self.fetch_dex_public_key().await;
let access_token = oauth_token_response.access_token().secret();
self.display_token("OAuth Access token", &access_token, None, &dex_pk);
self.display_token("OAuth Access token", access_token, None, &dex_pk);

if let Some(refresh_token) = oauth_token_response.refresh_token() {
self.display_token("OAuth Refresh token", refresh_token.secret(), None, &dex_pk);
Expand Down

0 comments on commit 96088a6

Please sign in to comment.