diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-09-10 16:12:55 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-09-10 16:12:55 +0200 |
| commit | 7cf393095282077b0bbae3046826b67f4f20a8eb (patch) | |
| tree | 9aaf5704cbb8612bf78378aefa40ae40e79a7850 /QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m | |
| parent | c4705a0a678ac523b243c7b68ce27fbf5e44b61a (diff) | |
Add auth key + complete task action
Diffstat (limited to 'QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m')
| -rw-r--r-- | QSThingsPlugin/Actions/SetThingsAuthenticationKeyAction.m | 21 |
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 |