From 7f4d30b205aed5bfc8aa702cb511f2431dc0553f Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Wed, 28 Mar 2018 12:13:56 +0200 Subject: [PATCH] - check refresh token --- Example/Podfile.lock | 4 ++-- Example/Pods/Local Podspecs/PNObject.podspec.json | 4 ++-- Example/Pods/Manifest.lock | 4 ++-- PNObject.podspec | 2 +- PNObject/Classes/PNObjectConfig.m | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 3e32ed4..6bff5ab 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -38,7 +38,7 @@ PODS: - NSString-Helper (1.0.6) - nv-ios-http-status (0.0.1) - PEAR-FileManager-iOS (1.3.1) - - PNObject (2.4): + - PNObject (2.4.1): - AFNetworking - CodFis-Helper - DDDKeychainWrapper @@ -85,7 +85,7 @@ SPEC CHECKSUMS: NSString-Helper: 389265918b2a4c5b0d09f0e03c607e8e5e254dd7 nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3 - PNObject: cc6af200d331801ff19825af6e381b1809f79f16 + PNObject: 5c3db798fbf278479377387882c73f980db4c30c PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 diff --git a/Example/Pods/Local Podspecs/PNObject.podspec.json b/Example/Pods/Local Podspecs/PNObject.podspec.json index 5128f69..183b13b 100644 --- a/Example/Pods/Local Podspecs/PNObject.podspec.json +++ b/Example/Pods/Local Podspecs/PNObject.podspec.json @@ -1,6 +1,6 @@ { "name": "PNObject", - "version": "2.4", + "version": "2.4.1", "summary": "PNObject is a simple replica of the more complex ParseObject", "homepage": "https://github.com/giuseppenucifora/PNObject", "license": { @@ -12,7 +12,7 @@ }, "source": { "git": "https://github.com/giuseppenucifora/PNObject.git", - "tag": "2.4" + "tag": "2.4.1" }, "platforms": { "ios": "8.0" diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 3e32ed4..6bff5ab 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -38,7 +38,7 @@ PODS: - NSString-Helper (1.0.6) - nv-ios-http-status (0.0.1) - PEAR-FileManager-iOS (1.3.1) - - PNObject (2.4): + - PNObject (2.4.1): - AFNetworking - CodFis-Helper - DDDKeychainWrapper @@ -85,7 +85,7 @@ SPEC CHECKSUMS: NSString-Helper: 389265918b2a4c5b0d09f0e03c607e8e5e254dd7 nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3 - PNObject: cc6af200d331801ff19825af6e381b1809f79f16 + PNObject: 5c3db798fbf278479377387882c73f980db4c30c PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 diff --git a/PNObject.podspec b/PNObject.podspec index 1034a02..27e8ff4 100644 --- a/PNObject.podspec +++ b/PNObject.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'PNObject' -s.version = '2.4' +s.version = '2.4.1' s.summary = 'PNObject is a simple replica of the more complex ParseObject' diff --git a/PNObject/Classes/PNObjectConfig.m b/PNObject/Classes/PNObjectConfig.m index 1d16330..e107df0 100644 --- a/PNObject/Classes/PNObjectConfig.m +++ b/PNObject/Classes/PNObjectConfig.m @@ -502,7 +502,7 @@ static bool isFirstAccess = YES; case OAuthModeClientCredential: { AFOAuthCredential *credential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier]; - if (credential && ![credential isExpired] && _currentClientCredenzialRefreshTokenEnabled) { + if (credential && ![credential isExpired] && nil != [credential refreshToken] && _currentClientCredenzialRefreshTokenEnabled) { [_clientCredentialAuthManager authenticateUsingOAuthWithURLString:_currentClientCredenzialEndPointUrl refreshToken:[credential refreshToken] success:^(AFOAuthCredential * _Nonnull credential) { @@ -561,7 +561,7 @@ static bool isFirstAccess = YES; AFOAuthCredential *credential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier]; - if (credential && ![credential isExpired] && _currentUserCredenzialRefreshTokenEnabled) { + if (credential && ![credential isExpired] && nil != [credential refreshToken] && _currentUserCredenzialRefreshTokenEnabled) { [_userCredentialAuthManager authenticateUsingOAuthWithURLString:_currentClientCredenzialEndPointUrl refreshToken:[credential refreshToken] success:^(AFOAuthCredential * _Nonnull credential) {