Skip to content

Commit d136d70

Browse files
committed
Merge branch 'release-3.50.1' into release
2 parents ddb501b + 7f80b68 commit d136d70

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/function/runner/core/FunctionUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ public static void saveAppSettingsToSecurityStorage(String key, Map<String, Stri
8181
return;
8282
}
8383
final String appSettingsJsonValue = JsonUtils.toJsonString(appSettings);
84-
IdeaSecureStore.getInstance().savePassword(FunctionApp.class.getName(), key, appSettingsJsonValue);
84+
IdeaSecureStore.getInstance().savePassword(key, appSettingsJsonValue);
8585
}
8686

8787
public static Map<String, String> loadAppSettingsFromSecurityStorage(String key) {
8888
if (StringUtils.isEmpty(key)) {
8989
return new HashMap<>();
9090
}
91-
final String value = IdeaSecureStore.getInstance().loadPassword(FunctionApp.class.getName(), key);
91+
final String value = IdeaSecureStore.getInstance().loadPassword(key);
9292
return StringUtils.isEmpty(value) ? new HashMap<>() : JsonUtils.fromJson(value, Map.class);
9393
}
9494

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/secure/IdeaSecureStore.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,12 @@ public void savePassword(@NotNull String serviceName, @NotNull String userName,
3535
public String loadPassword(@NotNull String serviceName, @NotNull String userName) {
3636
return passwordSafe.getPassword(new CredentialAttributes(serviceName, userName));
3737
}
38+
39+
public void savePassword(@NotNull String key, @NotNull String password) {
40+
passwordSafe.setPassword(new CredentialAttributes(key), password);
41+
}
42+
43+
public String loadPassword(@NotNull String key) {
44+
return passwordSafe.getPassword(new CredentialAttributes(key));
45+
}
3846
}

0 commit comments

Comments
 (0)