[fractal/not-so-secret: 8/8] passwd: make method name more accurate
- From: Alejandro Domínguez <aledomu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/not-so-secret: 8/8] passwd: make method name more accurate
- Date: Mon, 4 Jan 2021 18:05:51 +0000 (UTC)
commit 2768f785b1fec4651d09617af4b6aac95d670be4
Author: Alexandre Franke <afranke gnome org>
Date: Mon Jan 4 10:09:37 2021 +0100
passwd: make method name more accurate
fractal-gtk/src/appop/login.rs | 2 +-
fractal-gtk/src/passwd.rs | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/fractal-gtk/src/appop/login.rs b/fractal-gtk/src/appop/login.rs
index 211e167f..98f75a90 100644
--- a/fractal-gtk/src/appop/login.rs
+++ b/fractal-gtk/src/appop/login.rs
@@ -119,7 +119,7 @@ impl AppOp {
ld.session_client.homeserver().clone(),
ld.access_token.clone()
)));
- let _ = self.delete_pass("fractal");
+ let _ = self.delete_secret("fractal");
RUNTIME.spawn(async move {
match register::logout(homeserver, access_token).await {
Ok(_) => {
diff --git a/fractal-gtk/src/passwd.rs b/fractal-gtk/src/passwd.rs
index 714342cf..2d8563cf 100644
--- a/fractal-gtk/src/passwd.rs
+++ b/fractal-gtk/src/passwd.rs
@@ -29,8 +29,8 @@ impl From<IdError> for Error {
}
pub trait PasswordStorage {
- fn delete_pass(&self, key: &str) -> Result<(), secret_service::SsError> {
- ss_storage::delete_pass(key)
+ fn delete_secret(&self, key: &str) -> Result<(), secret_service::SsError> {
+ ss_storage::delete_secret(key)
}
fn store_pass(
@@ -67,7 +67,7 @@ mod ss_storage {
use crate::globals;
- pub fn delete_pass(key: &str) -> Result<(), secret_service::SsError> {
+ pub fn delete_secret(key: &str) -> Result<(), secret_service::SsError> {
let ss = SecretService::new(EncryptionType::Dh)?;
let collection = get_default_collection_unlocked(&ss)?;
@@ -90,7 +90,7 @@ mod ss_storage {
let key = "fractal-token";
// deleting previous items
- delete_pass(key)?;
+ delete_secret(key)?;
// create new item
collection.create_item(
@@ -146,7 +146,7 @@ mod ss_storage {
let key = "fractal";
// deleting previous items
- delete_pass(key)?;
+ delete_secret(key)?;
// create new item
collection.create_item(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]