Update sdk-core submodule , moving SessionDetails to src folder, code styling


Project: 
http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/commit/0d0cfa88
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/tree/0d0cfa88
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/diff/0d0cfa88

Branch: refs/heads/master
Commit: 0d0cfa885e55dfdc6b31abe493034cd154480a08
Parents: 5a0176e
Author: georgi.georgiev <georgi.georg...@certivox.com>
Authored: Sat Sep 17 15:50:13 2016 +0300
Committer: georgi.georgiev <georgi.georg...@certivox.com>
Committed: Sat Sep 17 15:50:13 2016 +0300

----------------------------------------------------------------------
 MPinSDK/MPinSDK.xcodeproj/project.pbxproj | 12 +++----
 MPinSDK/MPinSDK/SessionDetails.h          | 16 ----------
 MPinSDK/MPinSDK/SessionDetails.m          | 23 --------------
 mpin-sdk-core                             |  2 +-
 src/MPin.h                                | 44 +++++++++++++-------------
 src/MpinStatus.h                          |  4 ++-
 src/MpinStatus.m                          |  6 ++++
 src/SessionDetails.h                      | 16 ++++++++++
 src/SessionDetails.m                      | 23 ++++++++++++++
 9 files changed, 77 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/blob/0d0cfa88/MPinSDK/MPinSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/MPinSDK/MPinSDK.xcodeproj/project.pbxproj 
b/MPinSDK/MPinSDK.xcodeproj/project.pbxproj
index 98bba91..6b28fc6 100644
--- a/MPinSDK/MPinSDK.xcodeproj/project.pbxproj
+++ b/MPinSDK/MPinSDK.xcodeproj/project.pbxproj
@@ -8,7 +8,7 @@
 
 /* Begin PBXBuildFile section */
                FE49FF9C1A1A3C2D000030A4 /* Foundation.framework in Frameworks 
*/ = {isa = PBXBuildFile; fileRef = FE49FF9B1A1A3C2D000030A4 /* 
Foundation.framework */; };
-               FE7C75FC1CCF8D5B003AEB27 /* SessionDetails.m in Sources */ = 
{isa = PBXBuildFile; fileRef = FE7C75FB1CCF8D5B003AEB27 /* SessionDetails.m */; 
};
+               FE7A4AD71D8D72D600E732B4 /* SessionDetails.m in Sources */ = 
{isa = PBXBuildFile; fileRef = FE7A4AD61D8D72D600E732B4 /* SessionDetails.m */; 
};
                FE991F061C5F66540014F23E /* Context.mm in Sources */ = {isa = 
PBXBuildFile; fileRef = FE991EF61C5F66540014F23E /* Context.mm */; };
                FE991F071C5F66540014F23E /* HTTPConnector.mm in Sources */ = 
{isa = PBXBuildFile; fileRef = FE991EFA1C5F66540014F23E /* HTTPConnector.mm */; 
};
                FE991F081C5F66540014F23E /* MPin.mm in Sources */ = {isa = 
PBXBuildFile; fileRef = FE991EFD1C5F66540014F23E /* MPin.mm */; };
@@ -65,8 +65,8 @@
                FE49FF9B1A1A3C2D000030A4 /* Foundation.framework */ = {isa = 
PBXFileReference; lastKnownFileType = wrapper.framework; name = 
Foundation.framework; path = System/Library/Frameworks/Foundation.framework; 
sourceTree = SDKROOT; };
                FE49FF9F1A1A3C2D000030A4 /* MPinSDK-Prefix.pch */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
"MPinSDK-Prefix.pch"; sourceTree = "<group>"; };
                FE49FFAC1A1A3C2D000030A4 /* UIKit.framework */ = {isa = 
PBXFileReference; lastKnownFileType = wrapper.framework; name = 
UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = 
DEVELOPER_DIR; };
-               FE7C75FA1CCF8D5B003AEB27 /* SessionDetails.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SessionDetails.h; sourceTree = "<group>"; };
-               FE7C75FB1CCF8D5B003AEB27 /* SessionDetails.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= SessionDetails.m; sourceTree = "<group>"; };
+               FE7A4AD51D8D72D600E732B4 /* SessionDetails.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
SessionDetails.h; path = ../../src/SessionDetails.h; sourceTree = "<group>"; };
+               FE7A4AD61D8D72D600E732B4 /* SessionDetails.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name 
= SessionDetails.m; path = ../../src/SessionDetails.m; sourceTree = "<group>"; 
};
                FE991EF51C5F66540014F23E /* Context.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
Context.h; path = ../../src/Context.h; sourceTree = "<group>"; };
                FE991EF61C5F66540014F23E /* Context.mm */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; 
name = Context.mm; path = ../../src/Context.mm; sourceTree = "<group>"; };
                FE991EF71C5F66540014F23E /* def.h */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = def.h; path = 
../../src/def.h; sourceTree = "<group>"; };
@@ -181,10 +181,10 @@
                                FE991EFB1C5F66540014F23E /* IUser.h */,
                                FE991EFC1C5F66540014F23E /* MPin.h */,
                                FE991EFD1C5F66540014F23E /* MPin.mm */,
-                               FE7C75FA1CCF8D5B003AEB27 /* SessionDetails.h */,
-                               FE7C75FB1CCF8D5B003AEB27 /* SessionDetails.m */,
                                FE991EFE1C5F66540014F23E /* MpinStatus.h */,
                                FE991EFF1C5F66540014F23E /* MpinStatus.m */,
+                               FE7A4AD51D8D72D600E732B4 /* SessionDetails.h */,
+                               FE7A4AD61D8D72D600E732B4 /* SessionDetails.m */,
                                FE991F001C5F66540014F23E /* OTP.h */,
                                FE991F011C5F66540014F23E /* OTP.m */,
                                FE991F021C5F66540014F23E /* Storage.h */,
@@ -342,7 +342,7 @@
                                FE991F0A1C5F66540014F23E /* OTP.m in Sources */,
                                FE991F071C5F66540014F23E /* HTTPConnector.mm in 
Sources */,
                                FED0EE121C68C984001AB531 /* pair.c in Sources 
*/,
-                               FE7C75FC1CCF8D5B003AEB27 /* SessionDetails.m in 
Sources */,
+                               FE7A4AD71D8D72D600E732B4 /* SessionDetails.m in 
Sources */,
                                FED0EE131C68C984001AB531 /* rand.c in Sources 
*/,
                                FED0EE061C68C984001AB531 /* big.c in Sources */,
                                FED0EE141C68C984001AB531 /* rom.c in Sources */,

http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/blob/0d0cfa88/MPinSDK/MPinSDK/SessionDetails.h
----------------------------------------------------------------------
diff --git a/MPinSDK/MPinSDK/SessionDetails.h b/MPinSDK/MPinSDK/SessionDetails.h
deleted file mode 100644
index f19b30b..0000000
--- a/MPinSDK/MPinSDK/SessionDetails.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//
-//  SessionDetails.h
-//  MPinSDK
-//
-//  Created by Georgi Georgiev on 4/26/16.
-//  Copyright © 2016 Certivox. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@interface SessionDetails : NSObject
-@property (nonatomic, retain) NSString * prerollId;
-@property (nonatomic, retain) NSString * appName;
-@property (nonatomic, retain) NSString * appIconUrl;
-- (id) initWith:(NSString * ) prerollId appName:(NSString *) appName 
appIconUrl:(NSString *) appIconUrl;
-@end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/blob/0d0cfa88/MPinSDK/MPinSDK/SessionDetails.m
----------------------------------------------------------------------
diff --git a/MPinSDK/MPinSDK/SessionDetails.m b/MPinSDK/MPinSDK/SessionDetails.m
deleted file mode 100644
index b5cc0f6..0000000
--- a/MPinSDK/MPinSDK/SessionDetails.m
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-//  SessionDetails.m
-//  MPinSDK
-//
-//  Created by Georgi Georgiev on 4/26/16.
-//  Copyright © 2016 Certivox. All rights reserved.
-//
-
-#import "SessionDetails.h"
-
-@implementation SessionDetails
-
-- (id) initWith:(NSString * ) prerollId appName:(NSString *) appName 
appIconUrl:(NSString *) appIconUrl {
-    self = [super init];
-    if (self) {
-        self.prerollId = prerollId;
-        self.appName = appName;
-        self.appIconUrl = appIconUrl;
-    }
-    return self;
-}
-
-@end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/blob/0d0cfa88/mpin-sdk-core
----------------------------------------------------------------------
diff --git a/mpin-sdk-core b/mpin-sdk-core
index e631fb2..5a6c03f 160000
--- a/mpin-sdk-core
+++ b/mpin-sdk-core
@@ -1 +1 @@
-Subproject commit e631fb2db35485114e6628abee12a28989e35cff
+Subproject commit 5a6c03fa0ace77c3c1ae3e497bdca6f78c31b0a8

http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/blob/0d0cfa88/src/MPin.h
----------------------------------------------------------------------
diff --git a/src/MPin.h b/src/MPin.h
index e932d5d..9a9142d 100644
--- a/src/MPin.h
+++ b/src/MPin.h
@@ -25,38 +25,38 @@
 
 @interface MPin : NSObject
 
-+ (void)initSDK;
-+ (MpinStatus*)TestBackend:(const NSString*)url;
-+ (MpinStatus*)SetBackend:(const NSString*)url;
-+ (MpinStatus*)TestBackend:(const NSString*)url rpsPrefix:(NSString*)rpsPrefix;
-+ (MpinStatus*)SetBackend:(const NSString*)url rpsPrefix:(NSString*)rpsPrefix;
++ (void) initSDK;
++ (MpinStatus*) TestBackend:(const NSString*)url;
++ (MpinStatus*) SetBackend:(const NSString*)url;
++ (MpinStatus*) TestBackend:(const NSString*)url 
rpsPrefix:(NSString*)rpsPrefix;
++ (MpinStatus*) SetBackend:(const NSString*)url rpsPrefix:(NSString*)rpsPrefix;
 
-+ (id<IUser>)MakeNewUser:(const NSString*)identity;
-+ (id<IUser>)MakeNewUser:(const NSString*)identity
++ (id<IUser>) MakeNewUser:(const NSString*)identity;
++ (id<IUser>) MakeNewUser:(const NSString*)identity
               deviceName:(const NSString*)devName;
 
-+ (MpinStatus*)StartRegistration:(const id<IUser>)user;
-+ (MpinStatus*)StartRegistration:(const id<IUser>)user userData:(NSString *) 
userData;
-+ (MpinStatus*)StartRegistration:(const id<IUser>)user activateCode:(NSString 
*) activateCode;
-+ (MpinStatus*)StartRegistration:(const id<IUser>)user activateCode:(NSString 
*) activateCode userData:(NSString *) userData;
-+ (MpinStatus*)RestartRegistration:(const id<IUser>)user;
-+ (MpinStatus*)RestartRegistration:(const id<IUser>)user userData:(NSString *) 
userData;
++ (MpinStatus*) StartRegistration:(const id<IUser>)user;
++ (MpinStatus*) StartRegistration:(const id<IUser>)user userData:(NSString *) 
userData;
++ (MpinStatus*) StartRegistration:(const id<IUser>)user activateCode:(NSString 
*) activateCode;
++ (MpinStatus*) StartRegistration:(const id<IUser>)user activateCode:(NSString 
*) activateCode userData:(NSString *) userData;
++ (MpinStatus*) RestartRegistration:(const id<IUser>)user;
++ (MpinStatus*) RestartRegistration:(const id<IUser>)user userData:(NSString 
*) userData;
 + (MpinStatus*) ConfirmRegistration:(const id<IUser>)user;
 + (MpinStatus*) ConfirmRegistration:(const id<IUser>)user  
pushNotificationIdentifier:(NSString *) pushNotificationIdentifier;
-+ (MpinStatus*)FinishRegistration:(const id<IUser>)user pin:(NSString *) pin;
++ (MpinStatus*) FinishRegistration:(const id<IUser>)user pin:(NSString *) pin;
 
 + (MpinStatus*) StartAuthentication:(const id<IUser>)user;
 + (MpinStatus*) StartAuthentication:(const id<IUser>)user accessCode:(NSString 
*) accessCode;
 + (MpinStatus*) CheckAccessNumber:(NSString *)an;
-+ (MpinStatus*)FinishAuthentication:(const id<IUser>)user pin:(NSString *) pin;
-+ (MpinStatus*)FinishAuthentication:(const id<IUser>)user pin:(NSString *) pin 
authResultData:(NSString **)authResultData;
-+ (MpinStatus*)FinishAuthenticationOTP:(id<IUser>)user pin:(NSString *) pin 
otp:(OTP**)otp;
-+ (MpinStatus*)FinishAuthenticationAN:(id<IUser>)user pin:(NSString *) pin 
accessNumber:(NSString *)an;
++ (MpinStatus*) FinishAuthentication:(const id<IUser>)user pin:(NSString *) 
pin;
++ (MpinStatus*) FinishAuthentication:(const id<IUser>)user pin:(NSString *) 
pin authResultData:(NSString **)authResultData;
++ (MpinStatus*) FinishAuthenticationOTP:(id<IUser>)user pin:(NSString *) pin 
otp:(OTP**)otp;
++ (MpinStatus*) FinishAuthenticationAN:(id<IUser>)user pin:(NSString *) pin 
accessNumber:(NSString *)an;
 
-+ (Boolean)Logout:(const id<IUser>)user;
-+ (Boolean)CanLogout:(const id<IUser>)user;
++ (Boolean) Logout:(const id<IUser>)user;
++ (Boolean) CanLogout:(const id<IUser>)user;
 
-+ (NSMutableArray*)listUsers;
++ (NSMutableArray*) listUsers;
 + (NSMutableArray*) listUsers:( NSString *) backendURL;
 + (NSMutableArray*) listBackends;
 + (SessionDetails *) GetSessionDetails:(NSString *) accessCode;
@@ -67,6 +67,6 @@
 + (NSString *) GetClientParam:(const NSString *) key;
 
 /// TEMPORARY FIX
-+ (NSString*)getRPSUrl;
++ (NSString*) getRPSUrl;
 
 @end

http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/blob/0d0cfa88/src/MpinStatus.h
----------------------------------------------------------------------
diff --git a/src/MpinStatus.h b/src/MpinStatus.h
index 0df3605..26a3500 100644
--- a/src/MpinStatus.h
+++ b/src/MpinStatus.h
@@ -34,7 +34,9 @@ typedef NS_ENUM(NSInteger, MPinStatus) {
     INCORRECT_PIN, // Remote error - user entered wrong pin
     INCORRECT_ACCESS_NUMBER, // Remote/local error - wrong access number 
(checksum failed or RPS returned 412)
     HTTP_SERVER_ERROR, // Remote error, that was not reduced to one of the 
above - the remote server returned internal server error status (5xx)
-    HTTP_REQUEST_ERROR // Remote error, that was not reduced to one of the 
above - invalid data sent to server, the remote server returned 4xx error status
+    HTTP_REQUEST_ERROR, // Remote error, that was not reduced to one of the 
above - invalid data sent to server, the remote server returned 4xx error status
+    BAD_USER_AGENT, // Remote error - user agent not supported
+    CLIENT_SECRET_EXPIRED, // Remote error - re-registration required because 
server master secret expired
 };
 
 @interface MpinStatus : NSObject

http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/blob/0d0cfa88/src/MpinStatus.m
----------------------------------------------------------------------
diff --git a/src/MpinStatus.m b/src/MpinStatus.m
index c79545e..0ef5bd9 100644
--- a/src/MpinStatus.m
+++ b/src/MpinStatus.m
@@ -79,6 +79,12 @@
         case HTTP_REQUEST_ERROR:
             result = @"HTTP_REQUEST_ERROR";
             break;
+        case BAD_USER_AGENT:
+            result = @"BAD_USER_AGENT";
+            break;
+        case CLIENT_SECRET_EXPIRED:
+            result = @"CLIENT_SECRET_EXPIRED";
+            break;
         default:
             break;
     }

http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/blob/0d0cfa88/src/SessionDetails.h
----------------------------------------------------------------------
diff --git a/src/SessionDetails.h b/src/SessionDetails.h
new file mode 100644
index 0000000..f19b30b
--- /dev/null
+++ b/src/SessionDetails.h
@@ -0,0 +1,16 @@
+//
+//  SessionDetails.h
+//  MPinSDK
+//
+//  Created by Georgi Georgiev on 4/26/16.
+//  Copyright © 2016 Certivox. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface SessionDetails : NSObject
+@property (nonatomic, retain) NSString * prerollId;
+@property (nonatomic, retain) NSString * appName;
+@property (nonatomic, retain) NSString * appIconUrl;
+- (id) initWith:(NSString * ) prerollId appName:(NSString *) appName 
appIconUrl:(NSString *) appIconUrl;
+@end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-sdk-ios/blob/0d0cfa88/src/SessionDetails.m
----------------------------------------------------------------------
diff --git a/src/SessionDetails.m b/src/SessionDetails.m
new file mode 100644
index 0000000..b5cc0f6
--- /dev/null
+++ b/src/SessionDetails.m
@@ -0,0 +1,23 @@
+//
+//  SessionDetails.m
+//  MPinSDK
+//
+//  Created by Georgi Georgiev on 4/26/16.
+//  Copyright © 2016 Certivox. All rights reserved.
+//
+
+#import "SessionDetails.h"
+
+@implementation SessionDetails
+
+- (id) initWith:(NSString * ) prerollId appName:(NSString *) appName 
appIconUrl:(NSString *) appIconUrl {
+    self = [super init];
+    if (self) {
+        self.prerollId = prerollId;
+        self.appName = appName;
+        self.appIconUrl = appIconUrl;
+    }
+    return self;
+}
+
+@end
\ No newline at end of file

Reply via email to