- expose oauthmode for all methods and fix oauthmode
This commit is contained in:
1 parent
6c8cf96e65
commit
cd55374ea8
23 files changed
+1447
-1393
No files matched your search
@@ -39,7 +39,7 @@
|
||||
/* Begin PBXFileReference section */
|
||||
0ABF8340F735722CEE937FA3 /* libPods-PNObject_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PNObject_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
116AF818F8117B91EF290C9A /* Pods-PNObject_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||
2661CEE1F223361CD1DACC25 /* PNObject.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = PNObject.podspec; path = ../PNObject.podspec; sourceTree = "<group>"; };
|
||||
2661CEE1F223361CD1DACC25 /* PNObject.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = PNObject.podspec; path = ../PNObject.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
||||
3E392C278361604C1602CAF0 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
||||
6003F58A195388D20070C39A /* PNObject_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PNObject_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
|
||||
@@ -33,23 +33,27 @@
|
||||
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
// Override point for customization after application launch.
|
||||
|
||||
/**
|
||||
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @{BaseUrl:@"http://pnobject.local/",EndpointPath:@"api/v1/"},
|
||||
EnvironmentStage : @{BaseUrl:@"https://idd.ppreview.it/",EndpointPath:@"wp-json/v1/"},
|
||||
EnvironmentStage : @{BaseUrl:@"https://pnobject.stage.it/",EndpointPath:@"api/v1/"},
|
||||
EnvironmentProduction : @{BaseUrl:@"http://pnobject.prod.it/",EndpointPath:@"api/v1/"},
|
||||
} userSubclass:[PNUser class] withOauthMode:OAuthModeClientCredential];
|
||||
} andUserSubclass:[PNUser class]];
|
||||
|
||||
[[PNObjectConfig sharedInstance] setClientID:@"xVdEbNLLierj9CJoLNo5lsbg7VFs8UikqADbcwKA" clientSecret:@"2WWSJrDNbZhbUUCXIOTBiYIJv9muiRGK68f2B2Eb" oAuthEndpointAction:@"oauth/token" forEnv:EnvironmentStage];
|
||||
[[PNObjectConfig sharedInstance] setOauthClientID:@"tXYhKtcvfYdCM4tNor6WfbclEWYkoGWqBimUBzqZ" oauthClientSecret:@"3UMEQthBHp1oEo0pjFmgkifhig689ZL5L9DsSETd" oAuthEndpointAction:@"oauth/token" forEnv:EnvironmentStage];
|
||||
[[PNObjectConfig sharedInstance] setClientID:@"******" clientSecret:@"******" oAuthEndpointAction:@"api/v1/" oauthMode:OAuthModeClientCredential forEnv:EnvironmentStage];
|
||||
[[PNObjectConfig sharedInstance] setClientID:@"******" clientSecret:@"******" oAuthEndpointAction:@"api/v1/" oauthMode:OAuthModePassword forEnv:EnvironmentStage];
|
||||
*/
|
||||
|
||||
|
||||
/** Can user special char %@ to autoset EndpointPath to Oauth endpointPath */
|
||||
[[PNObjectConfig sharedInstance] setClientID:@"******" clientSecret:@"******" oAuthEndpointAction:@"%@oauth-token" oauthMode:OAuthModeClientCredential forEnv:EnvironmentStage];
|
||||
[[PNObjectConfig sharedInstance] setClientID:@"******" clientSecret:@"******" oAuthEndpointAction:@"%@oauth-token" oauthMode:OAuthModePassword forEnv:EnvironmentStage];
|
||||
|
||||
[[PNObjectConfig sharedInstance] setEnvironment:EnvironmentStage];
|
||||
//[[PNObjectConfig sharedInstance] setHTTPHeaderValue:@"XMLHttpRequest" forKey:@"X-Request-With"];
|
||||
|
||||
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] baseUrl]);
|
||||
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] endPointPath]);
|
||||
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] endPointUrl]);
|
||||
|
||||
|
||||
|
||||
PNObjViewController *viewController = [[PNObjViewController alloc] init];
|
||||
|
||||
switch ([[UIDevice currentDevice] deviceFamily]) {
|
||||
|
||||
@@ -93,11 +93,15 @@
|
||||
}
|
||||
|
||||
- (void) refreshTokenAction {
|
||||
[[PNObjectConfig sharedInstance] refreshTokenForClientCredential];
|
||||
[[PNObjectConfig sharedInstance] refreshTokenForClientCredentialWithBlockSuccess:^(BOOL refreshSuccess) {
|
||||
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void) cancelTokenAction {
|
||||
[[PNObjectConfig sharedInstance] resetToken];
|
||||
[[PNObjectConfig sharedInstance] resetAllTokens];
|
||||
}
|
||||
|
||||
- (void) apiCallAction {
|
||||
|
||||
@@ -38,7 +38,7 @@ PODS:
|
||||
- NSString-Helper (1.0.6)
|
||||
- nv-ios-http-status (0.0.1)
|
||||
- PEAR-FileManager-iOS (1.3.1)
|
||||
- PNObject (1.5):
|
||||
- PNObject (2.0):
|
||||
- AFNetworking
|
||||
- CodFis-Helper
|
||||
- DDDKeychainWrapper
|
||||
@@ -85,7 +85,7 @@ SPEC CHECKSUMS:
|
||||
NSString-Helper: 389265918b2a4c5b0d09f0e03c607e8e5e254dd7
|
||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||
PNObject: 75d5a262457e538027c6f7b9cbd4f8ee5700f21f
|
||||
PNObject: 1f79df2779559eaad82d9a345bc300eeb947a5d8
|
||||
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
||||
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
||||
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectDELETEConnection.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectGETConnection.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectPOSTConnection.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectDELETEConnection.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectGETConnection.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectPOSTConnection.h
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "PNObject",
|
||||
"version": "1.5",
|
||||
"version": "2.0",
|
||||
"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": "1.5"
|
||||
"tag": "2.0"
|
||||
},
|
||||
"platforms": {
|
||||
"ios": "8.0"
|
||||
|
||||
Generated
+2
-2
@@ -38,7 +38,7 @@ PODS:
|
||||
- NSString-Helper (1.0.6)
|
||||
- nv-ios-http-status (0.0.1)
|
||||
- PEAR-FileManager-iOS (1.3.1)
|
||||
- PNObject (1.5):
|
||||
- PNObject (2.0):
|
||||
- AFNetworking
|
||||
- CodFis-Helper
|
||||
- DDDKeychainWrapper
|
||||
@@ -85,7 +85,7 @@ SPEC CHECKSUMS:
|
||||
NSString-Helper: 389265918b2a4c5b0d09f0e03c607e8e5e254dd7
|
||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||
PNObject: 75d5a262457e538027c6f7b9cbd4f8ee5700f21f
|
||||
PNObject: 1f79df2779559eaad82d9a345bc300eeb947a5d8
|
||||
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
||||
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
||||
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
|
||||
|
||||
+896
-881
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user