From 7cf393095282077b0bbae3046826b67f4f20a8eb Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Wed, 10 Sep 2025 16:12:55 +0200 Subject: Add auth key + complete task action --- .../Actions/SetThingsAuthenticationKeyAction.m | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m (limited to 'QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m') 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 -- cgit