- Fix Config for Custom User Class
This commit is contained in:
parent
b6b3b5a21d
commit
65f47455e2
@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "PNObject"
|
||||
s.version = "0.3.11"
|
||||
s.version = "0.3.12"
|
||||
s.summary = "PNObject is a simple replica of the more complex ParseObject"
|
||||
|
||||
# This description is used to generate tags and improve search results.
|
||||
|
||||
@ -315,8 +315,6 @@ static bool isFirstAccess = YES;
|
||||
failure(error);
|
||||
}
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (BOOL) isAuthenticated {
|
||||
|
||||
@ -262,7 +262,7 @@ static bool isFirstAccess = YES;
|
||||
failure:(nullable void (^)(NSError * _Nonnull error))failure {
|
||||
|
||||
if([SINGLETON.userSubClass currentUser] && [[SINGLETON.userSubClass currentUser] hasValidEmailAndPasswordData]) {
|
||||
[_manager authenticateUsingOAuthWithURLString:[_currentEndPointBaseUrl stringByAppendingString:@"oauth-token"] username:[[PNUser currentUser] email] password:[[[PNUser currentUser] password] password] scope:nil success:^(AFOAuthCredential * _Nonnull credential) {
|
||||
[_manager authenticateUsingOAuthWithURLString:[_currentEndPointBaseUrl stringByAppendingString:@"oauth-token"] username:[[SINGLETON.userSubClass currentUser] email] password:[[(PNUser*)[SINGLETON.userSubClass currentUser] password] password] scope:nil success:^(AFOAuthCredential * _Nonnull credential) {
|
||||
_currentOauthCredential = credential;
|
||||
|
||||
[AFOAuthCredential storeCredential:_currentOauthCredential withIdentifier:PNObjectServiceCredentialIdentifier];
|
||||
@ -300,7 +300,7 @@ static bool isFirstAccess = YES;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (![PNUser isValidPassword:password]) {
|
||||
if (![SINGLETON.userSubClass isValidPassword:password]) {
|
||||
if (failure) {
|
||||
NSError *error = [NSError errorWithDomain:NSLocalizedString(@"Password is not valid", @"") code:kHTTPStatusCodeBadRequest userInfo:nil];
|
||||
failure(error);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user