aboutsummaryrefslogtreecommitdiff
path: root/QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-09-10 16:12:55 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-09-10 16:12:55 +0200
commit7cf393095282077b0bbae3046826b67f4f20a8eb (patch)
tree9aaf5704cbb8612bf78378aefa40ae40e79a7850 /QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m
parentc4705a0a678ac523b243c7b68ce27fbf5e44b61a (diff)
Add auth key + complete task action
Diffstat (limited to 'QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m')
-rw-r--r--QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m b/QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m
new file mode 100644
index 0000000..b9e7031
--- /dev/null
+++ b/QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m
@@ -0,0 +1,21 @@
+#import "SetThingsAuthenticationKeyAction.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SetThingsAuthenticationKeyAction
+
+- (QSObject *)setAuthenticationKey:(QSObject *)directObject
+{
+
+ NSString *contents = [directObject displayName];
+ if (contents) {
+ [KeychainHelper setAuthenticationKey:contents];
+ } else {
+ [KeychainHelper deleteAuthenticationKey];
+ }
+ return directObject;
+}
+
+@end
+
+NS_ASSUME_NONNULL_END