diff options
author | Vitaly Takmazov | 2019-03-19 22:53:05 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-03-19 22:53:05 +0300 |
commit | 9ac177e6a55d83b470529834ee4d635ad746e297 (patch) | |
tree | 700a17d39cdf032258c005276acf4de4c1e03b14 /Juick/Model | |
parent | 12bd1e22cdf0ec3b2e2d7efea6ba6de201ec4ffe (diff) |
re-read authorization on each AFHTTPSessionManager access
Diffstat (limited to 'Juick/Model')
-rw-r--r-- | Juick/Model/User.m | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/Juick/Model/User.m b/Juick/Model/User.m index 848fc2a..7f97e34 100644 --- a/Juick/Model/User.m +++ b/Juick/Model/User.m @@ -40,9 +40,6 @@ +(void) checkIsValid:(void (^)(BOOL))callback { AFHTTPSessionManager *manager = [APIClient sharedClient].manager; - NSString *username = [SAMKeychain passwordForService:[[NSBundle mainBundle] bundleIdentifier] account:@"com.juick.username"]; - NSString *password = [SAMKeychain passwordForService:[[NSBundle mainBundle] bundleIdentifier] account:@"com.juick.password"]; - [manager.requestSerializer setAuthorizationHeaderFieldWithUsername:username password:password]; [manager POST:@"post" parameters:nil progress:nil success:nil failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { NSInteger statusCode = ((NSHTTPURLResponse *)task.response).statusCode; if (statusCode == 400) { |