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