diff --git a/PNObject/Classes/PNClasses/PNUser.m b/PNObject/Classes/PNClasses/PNUser.m index 1fe6527..fea384c 100644 --- a/PNObject/Classes/PNClasses/PNUser.m +++ b/PNObject/Classes/PNClasses/PNUser.m @@ -235,7 +235,7 @@ static bool isFirstAccess = YES; } } else { - [[PNObjectConfig sharedInstance] refreshTokenForUserWithFacebookID:[result objectForKey:@"id"] facebookToken:[FBSDKAccessToken currentAccessToken].tokenString withBlockSuccess:^(BOOL refreshSuccess) { + [[PNObjectConfig sharedInstance] refreshTokenForUserWithFacebookId:[result objectForKey:@"id"] facebookToken:[FBSDKAccessToken currentAccessToken].tokenString withBlockSuccess:^(BOOL refreshSuccess) { PNUser *user = [[self class] new]; diff --git a/PNObject/Classes/PNObject+Protected.h b/PNObject/Classes/PNObject+Protected.h index b9bc086..0a56c27 100644 --- a/PNObject/Classes/PNObject+Protected.h +++ b/PNObject/Classes/PNObject+Protected.h @@ -52,7 +52,7 @@ /** * <#Description#> * - * @param mappingSelector <#mappingSelector description#> + * @param dictionaryMappingSelector <#mappingSelector description#> * * @return <#return value description#> */ diff --git a/PNObject/Classes/PNObjectConfig.h b/PNObject/Classes/PNObjectConfig.h index c173e3f..9c0b725 100644 --- a/PNObject/Classes/PNObjectConfig.h +++ b/PNObject/Classes/PNObjectConfig.h @@ -123,7 +123,7 @@ typedef NS_ENUM(NSInteger, OAuthMode) { /** * <#Description#> * - * @param env <#env description#> + * @param environment <#env description#> */ - (void) setEnvironment:(NSString * _Nonnull) environment; @@ -138,7 +138,6 @@ typedef NS_ENUM(NSInteger, OAuthMode) { /** * <#Description#> * - * @param value EnvironmentProduction, EnvironmentStage, EnvironmentDevelopment * @param key <#key description#> */ - (void) removeHTTPHeaderValueForKey:(NSString * _Nonnull) key; @@ -225,7 +224,7 @@ typedef NS_ENUM(NSInteger, OAuthMode) { failure:(nullable void (^)(NSError * _Nonnull error))failure; -- (void) refreshTokenForUserWithFacebookID:(NSString * _Nonnull) facebookID +- (void) refreshTokenForUserWithFacebookId:(NSString * _Nonnull) facebookId facebookToken:(NSString * _Nonnull) facebookToken withBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success failure:(nullable void (^)(NSError * _Nonnull error))failure; diff --git a/PNObject/Classes/PNObjectConfig.m b/PNObject/Classes/PNObjectConfig.m index eb9d09c..5469eba 100644 --- a/PNObject/Classes/PNObjectConfig.m +++ b/PNObject/Classes/PNObjectConfig.m @@ -431,7 +431,7 @@ static bool isFirstAccess = YES; } } else { - [self refreshTokenForUserWithFacebookID:[[SINGLETON_PNObjectConfig.userSubClass currentUser] facebookId] facebookToken:[[FBSDKAccessToken currentAccessToken] tokenString] withBlockSuccess:success failure:failure]; + [self refreshTokenForUserWithFacebookId:[[SINGLETON_PNObjectConfig.userSubClass currentUser] facebookId] facebookToken:[[FBSDKAccessToken currentAccessToken] tokenString] withBlockSuccess:success failure:failure]; } }]; } @@ -489,11 +489,11 @@ static bool isFirstAccess = YES; }]; } -- (void) refreshTokenForUserWithFacebookID:(NSString * _Nonnull) facebookID +- (void) refreshTokenForUserWithFacebookId:(NSString * _Nonnull) facebookId facebookToken:(NSString * _Nonnull) facebookToken withBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success failure:(nullable void (^)(NSError * _Nonnull error))failure { - if (!facebookID || [facebookID length] == 0) { + if (!facebookId || [facebookId length] == 0) { if (failure) { NSError *error = [NSError errorWithDomain:NSLocalizedString(@"Facebook id is not valid", @"") code:kHTTPStatusCodeBadRequest userInfo:nil]; failure(error); @@ -508,7 +508,7 @@ static bool isFirstAccess = YES; } } - [_authManager authenticateUsingFacebookOAuthWithURLString:[_currentEndPointUrl stringByAppendingString:@"oauth-token"] facebookID:facebookID facebookToken:facebookToken scope:nil success:^(AFOAuthCredential * _Nonnull credential) { + [_authManager authenticateUsingFacebookOAuthWithURLString:[_currentEndPointUrl stringByAppendingString:@"oauth-token"] facebookId:facebookId facebookToken:facebookToken scope:nil success:^(AFOAuthCredential * _Nonnull credential) { _currentOauthCredential = credential; [AFOAuthCredential storeCredential:_currentOauthCredential withIdentifier:PNObjectServiceUserCredentialIdentifier]; diff --git a/PNObject/Classes/Vendors/AFOAuth2Manager/AFOAuth2Manager.h b/PNObject/Classes/Vendors/AFOAuth2Manager/AFOAuth2Manager.h index 2e70f56..1a17fbb 100644 --- a/PNObject/Classes/Vendors/AFOAuth2Manager/AFOAuth2Manager.h +++ b/PNObject/Classes/Vendors/AFOAuth2Manager/AFOAuth2Manager.h @@ -114,14 +114,14 @@ NS_ASSUME_NONNULL_BEGIN Creates and enqueues an `NSURLSessionTask` to authenticate against the server using a specified facebook id and facebook token, with a designated scope. @param URLString The URL string used to create the request URL. - @param facebookID The facebook id used for authentication + @param facebookId The facebook id used for authentication @param facebookToken The facebook token used for authentication @param scope The authorization scope @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes a single argument: the OAuth credential returned by the server. @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error returned from the server. */ - (NSURLSessionTask *)authenticateUsingFacebookOAuthWithURLString:(NSString *)URLString - facebookID:(NSString *)facebookid + facebookId:(NSString *)facebookId facebookToken:(NSString *)facebookToken scope:(nullable NSString *)scope success:(void (^)(AFOAuthCredential * _Nonnull))success diff --git a/PNObject/Classes/Vendors/AFOAuth2Manager/AFOAuth2Manager.m b/PNObject/Classes/Vendors/AFOAuth2Manager/AFOAuth2Manager.m index 66419c8..10d533b 100644 --- a/PNObject/Classes/Vendors/AFOAuth2Manager/AFOAuth2Manager.m +++ b/PNObject/Classes/Vendors/AFOAuth2Manager/AFOAuth2Manager.m @@ -162,17 +162,17 @@ static NSError * AFErrorFromRFC6749Section5_2Error(id object) { } - (NSURLSessionTask *)authenticateUsingFacebookOAuthWithURLString:(NSString *)URLString - facebookID:(NSString *)facebookid + facebookId:(NSString *)facebookId facebookToken:(NSString *)facebookToken scope:(NSString *)scope success:(void (^)(AFOAuthCredential * _Nonnull))success failure:(void (^)(NSError * _Nonnull))failure { - NSParameterAssert(facebookid); + NSParameterAssert(facebookId); NSParameterAssert(facebookToken); NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; [parameters setValue:kAFOAuthFacebookCredentialGrantType forKey:@"grant_type"]; - [parameters setValue:facebookid forKey:@"username"]; + [parameters setValue:facebookId forKey:@"username"]; [parameters setValue:facebookToken forKey:@"password"]; if (scope) {