summaryrefslogtreecommitdiff
path: root/Juick/APIClient.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/APIClient.m')
-rw-r--r--Juick/APIClient.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/Juick/APIClient.m b/Juick/APIClient.m
index f637710..44e7537 100644
--- a/Juick/APIClient.m
+++ b/Juick/APIClient.m
@@ -200,6 +200,10 @@
} ];
}
+-(BOOL) isAuthenticated {
+ NSString *password = [SAMKeychain passwordForService:[[NSBundle mainBundle] bundleIdentifier] account:@"com.juick.password"];
+ return password != nil;
+}
- (void)fetchImageWithURL:(NSURL *)url callback:(void (^)(NSData *))callback {
NSURLSessionDataTask *dataTask = [self.urlSession dataTaskWithURL:url completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {