diff --git a/client-api/sso-client-api.xcodeproj/project.pbxproj b/client-api/sso-client-api.xcodeproj/project.pbxproj new file mode 100644 index 0000000..dd7c047 --- /dev/null +++ b/client-api/sso-client-api.xcodeproj/project.pbxproj @@ -0,0 +1,249 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 3E7551DC1860C0B0008930B8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E7551DB1860C0B0008930B8 /* Foundation.framework */; }; + 3E7551E11860C0B0008930B8 /* ssoClient.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3E7551E01860C0B0008930B8 /* ssoClient.h */; }; + 3E7551E31860C0B0008930B8 /* ssoClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E7551E21860C0B0008930B8 /* ssoClient.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 3E7551D61860C0B0008930B8 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/${PRODUCT_NAME}"; + dstSubfolderSpec = 16; + files = ( + 3E7551E11860C0B0008930B8 /* ssoClient.h in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 3E7551D81860C0B0008930B8 /* libsso-client-api.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libsso-client-api.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3E7551DB1860C0B0008930B8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 3E7551DF1860C0B0008930B8 /* sso-client-api-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "sso-client-api-Prefix.pch"; sourceTree = ""; }; + 3E7551E01860C0B0008930B8 /* ssoClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ssoClient.h; sourceTree = ""; }; + 3E7551E21860C0B0008930B8 /* ssoClient.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ssoClient.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3E7551D51860C0B0008930B8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3E7551DC1860C0B0008930B8 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3E7551CF1860C0B0008930B8 = { + isa = PBXGroup; + children = ( + 3E7551DD1860C0B0008930B8 /* sso-client-api */, + 3E7551DA1860C0B0008930B8 /* Frameworks */, + 3E7551D91860C0B0008930B8 /* Products */, + ); + sourceTree = ""; + }; + 3E7551D91860C0B0008930B8 /* Products */ = { + isa = PBXGroup; + children = ( + 3E7551D81860C0B0008930B8 /* libsso-client-api.a */, + ); + name = Products; + sourceTree = ""; + }; + 3E7551DA1860C0B0008930B8 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 3E7551DB1860C0B0008930B8 /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 3E7551DD1860C0B0008930B8 /* sso-client-api */ = { + isa = PBXGroup; + children = ( + 3E7551E01860C0B0008930B8 /* ssoClient.h */, + 3E7551E21860C0B0008930B8 /* ssoClient.m */, + 3E7551DE1860C0B0008930B8 /* Supporting Files */, + ); + path = "sso-client-api"; + sourceTree = ""; + }; + 3E7551DE1860C0B0008930B8 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 3E7551DF1860C0B0008930B8 /* sso-client-api-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3E7551D71860C0B0008930B8 /* sso-client-api */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3E7551E61860C0B0008930B8 /* Build configuration list for PBXNativeTarget "sso-client-api" */; + buildPhases = ( + 3E7551D41860C0B0008930B8 /* Sources */, + 3E7551D51860C0B0008930B8 /* Frameworks */, + 3E7551D61860C0B0008930B8 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "sso-client-api"; + productName = "sso-client-api"; + productReference = 3E7551D81860C0B0008930B8 /* libsso-client-api.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3E7551D01860C0B0008930B8 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0460; + ORGANIZATIONNAME = "Black, Gavin S."; + }; + buildConfigurationList = 3E7551D31860C0B0008930B8 /* Build configuration list for PBXProject "sso-client-api" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 3E7551CF1860C0B0008930B8; + productRefGroup = 3E7551D91860C0B0008930B8 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 3E7551D71860C0B0008930B8 /* sso-client-api */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 3E7551D41860C0B0008930B8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3E7551E31860C0B0008930B8 /* ssoClient.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3E7551E41860C0B0008930B8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 3E7551E51860C0B0008930B8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.1; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 3E7551E71860C0B0008930B8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/sso_client_api.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "sso-client-api/sso-client-api-Prefix.pch"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 3E7551E81860C0B0008930B8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/sso_client_api.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "sso-client-api/sso-client-api-Prefix.pch"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3E7551D31860C0B0008930B8 /* Build configuration list for PBXProject "sso-client-api" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E7551E41860C0B0008930B8 /* Debug */, + 3E7551E51860C0B0008930B8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3E7551E61860C0B0008930B8 /* Build configuration list for PBXNativeTarget "sso-client-api" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E7551E71860C0B0008930B8 /* Debug */, + 3E7551E81860C0B0008930B8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 3E7551D01860C0B0008930B8 /* Project object */; +} diff --git a/client-api/sso-client-api.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/client-api/sso-client-api.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..3d81db1 --- /dev/null +++ b/client-api/sso-client-api.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/client-api/sso-client-api.xcodeproj/project.xcworkspace/xcuserdata/gblack.xcuserdatad/UserInterfaceState.xcuserstate b/client-api/sso-client-api.xcodeproj/project.xcworkspace/xcuserdata/gblack.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..728479f Binary files /dev/null and b/client-api/sso-client-api.xcodeproj/project.xcworkspace/xcuserdata/gblack.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/client-api/sso-client-api.xcodeproj/xcuserdata/gblack.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/client-api/sso-client-api.xcodeproj/xcuserdata/gblack.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist new file mode 100644 index 0000000..9f2a8cb --- /dev/null +++ b/client-api/sso-client-api.xcodeproj/xcuserdata/gblack.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -0,0 +1,20 @@ + + + + + + + diff --git a/client-api/sso-client-api.xcodeproj/xcuserdata/gblack.xcuserdatad/xcschemes/sso-client-api.xcscheme b/client-api/sso-client-api.xcodeproj/xcuserdata/gblack.xcuserdatad/xcschemes/sso-client-api.xcscheme new file mode 100644 index 0000000..fe138c2 --- /dev/null +++ b/client-api/sso-client-api.xcodeproj/xcuserdata/gblack.xcuserdatad/xcschemes/sso-client-api.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client-api/sso-client-api.xcodeproj/xcuserdata/gblack.xcuserdatad/xcschemes/xcschememanagement.plist b/client-api/sso-client-api.xcodeproj/xcuserdata/gblack.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..94e7cc7 --- /dev/null +++ b/client-api/sso-client-api.xcodeproj/xcuserdata/gblack.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + sso-client-api.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 3E7551D71860C0B0008930B8 + + primary + + + + + diff --git a/client-api/sso-client-api/sso-client-api-Prefix.pch b/client-api/sso-client-api/sso-client-api-Prefix.pch new file mode 100644 index 0000000..93c7363 --- /dev/null +++ b/client-api/sso-client-api/sso-client-api-Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'sso-client-api' target in the 'sso-client-api' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/client-api/sso-client-api/ssoClient.h b/client-api/sso-client-api/ssoClient.h new file mode 100644 index 0000000..4c924fd --- /dev/null +++ b/client-api/sso-client-api/ssoClient.h @@ -0,0 +1,18 @@ +// +// sso_client_api.h +// sso-client-api +// +// Created by Black, Gavin S. on 12/17/13. +// Copyright (c) 2013 Black, Gavin S. All rights reserved. +// + +#import + +@interface ssoClient : NSObject + ++ (void) logout; ++ (NSString*) fetchHash : (NSString*) callbackURI; ++ (NSString* ) fetchAndMergeHash : (NSString *) callbackURI : (NSString *) additionalHash; + + +@end diff --git a/client-api/sso-client-api/ssoClient.m b/client-api/sso-client-api/ssoClient.m new file mode 100644 index 0000000..6f57637 --- /dev/null +++ b/client-api/sso-client-api/ssoClient.m @@ -0,0 +1,73 @@ +// +// sso_client_api.m +// sso-client-api +// +// Created by Black, Gavin S. on 12/17/13. +// Copyright (c) 2013 Black, Gavin S. All rights reserved. +// + +#import "ssoClient.h" +#import + + +@implementation ssoClient + +static NSString *uuid; + ++ (void) logout { + UIPasteboard *appPasteBoard = [UIPasteboard pasteboardWithName:@"iMAS_SSO" create:NO]; + appPasteBoard.persistent = NO; + [appPasteBoard setString:@""]; +} + ++ (NSString*) fetchHash : (NSString*) callbackURI { + if(uuid == nil) uuid = [[NSUUID UUID] UUIDString]; + NSString* pbName = [NSString stringWithFormat:@"%@%@", @"iMAS", [[NSUUID UUID] UUIDString]]; + + // Test if the relevant iMAS pasteboard exists, if not open up SSO app + //UIPasteboard *appPasteBoard = [UIPasteboard pasteboardWithName:pbName create:NO]; + UIPasteboard *appPasteBoard = [UIPasteboard pasteboardWithName:@"iMAS_SSO" create:NO]; + + if(appPasteBoard != nil) { + NSString* ps =[appPasteBoard string]; + if([ps length] >= 1) return ps; + } + + NSString* ssoURI = [NSString stringWithFormat:@"iMASSO://%@/%@", pbName, callbackURI]; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:ssoURI]]; + exit(0); + return @""; +} + ++ (NSString* ) fetchAndMergeHash : (NSString *) callbackURI : (NSString *) additionalHash { + NSString* requestedHash = [ssoClient fetchHash:callbackURI]; + + NSData *data = [requestedHash dataUsingEncoding:NSUTF8StringEncoding]; + char *dataBytes = (char *) [data bytes]; + char *keyData = (char *) [[additionalHash dataUsingEncoding:NSUTF8StringEncoding] bytes]; + + char *dataPtr = dataBytes; + int dataIndex = 0; + + char *keyPtr = keyData; + int keyIndex = 0; + + int max = [data length]; + if( [data length] < [additionalHash length]) max = [additionalHash length]; + + for (int x = 0; x < max; x++) + { + *dataPtr = *dataPtr++ ^ *keyPtr++; + + // Roll over + if (++keyIndex == [additionalHash length]) + keyIndex = 0, keyPtr = keyData; + if (++dataIndex == [data length]) + dataIndex = 0, dataPtr = dataBytes; + } + + return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; +} + + +@end diff --git a/example-clients/simple-sso-client/simple-sso-client.xcodeproj/project.pbxproj b/example-clients/simple-sso-client/simple-sso-client.xcodeproj/project.pbxproj new file mode 100644 index 0000000..cd8d6e4 --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client.xcodeproj/project.pbxproj @@ -0,0 +1,319 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 3E7552A71861B99D008930B8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E7552A61861B99D008930B8 /* UIKit.framework */; }; + 3E7552A91861B99D008930B8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E7552A81861B99D008930B8 /* Foundation.framework */; }; + 3E7552AB1861B99D008930B8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E7552AA1861B99D008930B8 /* CoreGraphics.framework */; }; + 3E7552B11861B99D008930B8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3E7552AF1861B99D008930B8 /* InfoPlist.strings */; }; + 3E7552B31861B99D008930B8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E7552B21861B99D008930B8 /* main.m */; }; + 3E7552B71861B99D008930B8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E7552B61861B99D008930B8 /* AppDelegate.m */; }; + 3E7552B91861B99D008930B8 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 3E7552B81861B99D008930B8 /* Default.png */; }; + 3E7552BB1861B99D008930B8 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3E7552BA1861B99D008930B8 /* Default@2x.png */; }; + 3E7552BD1861B99D008930B8 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3E7552BC1861B99D008930B8 /* Default-568h@2x.png */; }; + 3E7552C01861B99D008930B8 /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3E7552BE1861B99D008930B8 /* MainStoryboard_iPhone.storyboard */; }; + 3E7552C31861B99D008930B8 /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3E7552C11861B99D008930B8 /* MainStoryboard_iPad.storyboard */; }; + 3E7552C61861B99D008930B8 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E7552C51861B99D008930B8 /* ViewController.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 3E7552A31861B99D008930B8 /* simple-sso-client.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "simple-sso-client.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3E7552A61861B99D008930B8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 3E7552A81861B99D008930B8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 3E7552AA1861B99D008930B8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 3E7552AE1861B99D008930B8 /* simple-sso-client-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "simple-sso-client-Info.plist"; sourceTree = ""; }; + 3E7552B01861B99D008930B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 3E7552B21861B99D008930B8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 3E7552B41861B99D008930B8 /* simple-sso-client-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "simple-sso-client-Prefix.pch"; sourceTree = ""; }; + 3E7552B51861B99D008930B8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 3E7552B61861B99D008930B8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 3E7552B81861B99D008930B8 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 3E7552BA1861B99D008930B8 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 3E7552BC1861B99D008930B8 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 3E7552BF1861B99D008930B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = ""; }; + 3E7552C21861B99D008930B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = ""; }; + 3E7552C41861B99D008930B8 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 3E7552C51861B99D008930B8 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3E7552A01861B99D008930B8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3E7552A71861B99D008930B8 /* UIKit.framework in Frameworks */, + 3E7552A91861B99D008930B8 /* Foundation.framework in Frameworks */, + 3E7552AB1861B99D008930B8 /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3E75529A1861B99D008930B8 = { + isa = PBXGroup; + children = ( + 3E7552AC1861B99D008930B8 /* simple-sso-client */, + 3E7552A51861B99D008930B8 /* Frameworks */, + 3E7552A41861B99D008930B8 /* Products */, + ); + sourceTree = ""; + }; + 3E7552A41861B99D008930B8 /* Products */ = { + isa = PBXGroup; + children = ( + 3E7552A31861B99D008930B8 /* simple-sso-client.app */, + ); + name = Products; + sourceTree = ""; + }; + 3E7552A51861B99D008930B8 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 3E7552A61861B99D008930B8 /* UIKit.framework */, + 3E7552A81861B99D008930B8 /* Foundation.framework */, + 3E7552AA1861B99D008930B8 /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 3E7552AC1861B99D008930B8 /* simple-sso-client */ = { + isa = PBXGroup; + children = ( + 3E7552B51861B99D008930B8 /* AppDelegate.h */, + 3E7552B61861B99D008930B8 /* AppDelegate.m */, + 3E7552BE1861B99D008930B8 /* MainStoryboard_iPhone.storyboard */, + 3E7552C11861B99D008930B8 /* MainStoryboard_iPad.storyboard */, + 3E7552C41861B99D008930B8 /* ViewController.h */, + 3E7552C51861B99D008930B8 /* ViewController.m */, + 3E7552AD1861B99D008930B8 /* Supporting Files */, + ); + path = "simple-sso-client"; + sourceTree = ""; + }; + 3E7552AD1861B99D008930B8 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 3E7552AE1861B99D008930B8 /* simple-sso-client-Info.plist */, + 3E7552AF1861B99D008930B8 /* InfoPlist.strings */, + 3E7552B21861B99D008930B8 /* main.m */, + 3E7552B41861B99D008930B8 /* simple-sso-client-Prefix.pch */, + 3E7552B81861B99D008930B8 /* Default.png */, + 3E7552BA1861B99D008930B8 /* Default@2x.png */, + 3E7552BC1861B99D008930B8 /* Default-568h@2x.png */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3E7552A21861B99D008930B8 /* simple-sso-client */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3E7552C91861B99D008930B8 /* Build configuration list for PBXNativeTarget "simple-sso-client" */; + buildPhases = ( + 3E75529F1861B99D008930B8 /* Sources */, + 3E7552A01861B99D008930B8 /* Frameworks */, + 3E7552A11861B99D008930B8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "simple-sso-client"; + productName = "simple-sso-client"; + productReference = 3E7552A31861B99D008930B8 /* simple-sso-client.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3E75529B1861B99D008930B8 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0460; + ORGANIZATIONNAME = "Black, Gavin S."; + }; + buildConfigurationList = 3E75529E1861B99D008930B8 /* Build configuration list for PBXProject "simple-sso-client" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 3E75529A1861B99D008930B8; + productRefGroup = 3E7552A41861B99D008930B8 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 3E7552A21861B99D008930B8 /* simple-sso-client */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 3E7552A11861B99D008930B8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3E7552B11861B99D008930B8 /* InfoPlist.strings in Resources */, + 3E7552B91861B99D008930B8 /* Default.png in Resources */, + 3E7552BB1861B99D008930B8 /* Default@2x.png in Resources */, + 3E7552BD1861B99D008930B8 /* Default-568h@2x.png in Resources */, + 3E7552C01861B99D008930B8 /* MainStoryboard_iPhone.storyboard in Resources */, + 3E7552C31861B99D008930B8 /* MainStoryboard_iPad.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3E75529F1861B99D008930B8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3E7552B31861B99D008930B8 /* main.m in Sources */, + 3E7552B71861B99D008930B8 /* AppDelegate.m in Sources */, + 3E7552C61861B99D008930B8 /* ViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 3E7552AF1861B99D008930B8 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 3E7552B01861B99D008930B8 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 3E7552BE1861B99D008930B8 /* MainStoryboard_iPhone.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3E7552BF1861B99D008930B8 /* en */, + ); + name = MainStoryboard_iPhone.storyboard; + sourceTree = ""; + }; + 3E7552C11861B99D008930B8 /* MainStoryboard_iPad.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3E7552C21861B99D008930B8 /* en */, + ); + name = MainStoryboard_iPad.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3E7552C71861B99D008930B8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 3E7552C81861B99D008930B8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.1; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 3E7552CA1861B99D008930B8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "simple-sso-client/simple-sso-client-Prefix.pch"; + INFOPLIST_FILE = "simple-sso-client/simple-sso-client-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 3E7552CB1861B99D008930B8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "simple-sso-client/simple-sso-client-Prefix.pch"; + INFOPLIST_FILE = "simple-sso-client/simple-sso-client-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3E75529E1861B99D008930B8 /* Build configuration list for PBXProject "simple-sso-client" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E7552C71861B99D008930B8 /* Debug */, + 3E7552C81861B99D008930B8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3E7552C91861B99D008930B8 /* Build configuration list for PBXNativeTarget "simple-sso-client" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3E7552CA1861B99D008930B8 /* Debug */, + 3E7552CB1861B99D008930B8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 3E75529B1861B99D008930B8 /* Project object */; +} diff --git a/example-clients/simple-sso-client/simple-sso-client/AppDelegate.h b/example-clients/simple-sso-client/simple-sso-client/AppDelegate.h new file mode 100644 index 0000000..b33100c --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// simple-sso-client +// +// Created by Black, Gavin S. on 12/18/13. +// Copyright (c) 2013 Black, Gavin S. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/example-clients/simple-sso-client/simple-sso-client/AppDelegate.m b/example-clients/simple-sso-client/simple-sso-client/AppDelegate.m new file mode 100644 index 0000000..2528660 --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client/AppDelegate.m @@ -0,0 +1,46 @@ +// +// AppDelegate.m +// simple-sso-client +// +// Created by Black, Gavin S. on 12/18/13. +// Copyright (c) 2013 Black, Gavin S. All rights reserved. +// + +#import "AppDelegate.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + // Override point for customization after application launch. + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/example-clients/simple-sso-client/simple-sso-client/Default-568h@2x.png b/example-clients/simple-sso-client/simple-sso-client/Default-568h@2x.png new file mode 100644 index 0000000..0891b7a Binary files /dev/null and b/example-clients/simple-sso-client/simple-sso-client/Default-568h@2x.png differ diff --git a/example-clients/simple-sso-client/simple-sso-client/Default.png b/example-clients/simple-sso-client/simple-sso-client/Default.png new file mode 100644 index 0000000..4c8ca6f Binary files /dev/null and b/example-clients/simple-sso-client/simple-sso-client/Default.png differ diff --git a/example-clients/simple-sso-client/simple-sso-client/Default@2x.png b/example-clients/simple-sso-client/simple-sso-client/Default@2x.png new file mode 100644 index 0000000..35b84cf Binary files /dev/null and b/example-clients/simple-sso-client/simple-sso-client/Default@2x.png differ diff --git a/example-clients/simple-sso-client/simple-sso-client/ViewController.h b/example-clients/simple-sso-client/simple-sso-client/ViewController.h new file mode 100644 index 0000000..432ee96 --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client/ViewController.h @@ -0,0 +1,13 @@ +// +// ViewController.h +// simple-sso-client +// +// Created by Black, Gavin S. on 12/18/13. +// Copyright (c) 2013 Black, Gavin S. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + +@end diff --git a/example-clients/simple-sso-client/simple-sso-client/ViewController.m b/example-clients/simple-sso-client/simple-sso-client/ViewController.m new file mode 100644 index 0000000..f8cfc48 --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client/ViewController.m @@ -0,0 +1,29 @@ +// +// ViewController.m +// simple-sso-client +// +// Created by Black, Gavin S. on 12/18/13. +// Copyright (c) 2013 Black, Gavin S. All rights reserved. +// + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/example-clients/simple-sso-client/simple-sso-client/en.lproj/InfoPlist.strings b/example-clients/simple-sso-client/simple-sso-client/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/example-clients/simple-sso-client/simple-sso-client/en.lproj/MainStoryboard_iPad.storyboard b/example-clients/simple-sso-client/simple-sso-client/en.lproj/MainStoryboard_iPad.storyboard new file mode 100644 index 0000000..9fbe23e --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client/en.lproj/MainStoryboard_iPad.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/example-clients/simple-sso-client/simple-sso-client/en.lproj/MainStoryboard_iPhone.storyboard b/example-clients/simple-sso-client/simple-sso-client/en.lproj/MainStoryboard_iPhone.storyboard new file mode 100644 index 0000000..c9acc6d --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client/en.lproj/MainStoryboard_iPhone.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/example-clients/simple-sso-client/simple-sso-client/main.m b/example-clients/simple-sso-client/simple-sso-client/main.m new file mode 100644 index 0000000..1994d4f --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client/main.m @@ -0,0 +1,18 @@ +// +// main.m +// simple-sso-client +// +// Created by Black, Gavin S. on 12/18/13. +// Copyright (c) 2013 Black, Gavin S. All rights reserved. +// + +#import + +#import "AppDelegate.h" + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/example-clients/simple-sso-client/simple-sso-client/simple-sso-client-Info.plist b/example-clients/simple-sso-client/simple-sso-client/simple-sso-client-Info.plist new file mode 100644 index 0000000..a691b92 --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client/simple-sso-client-Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + mitre.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIMainStoryboardFile + MainStoryboard_iPhone + UIMainStoryboardFile~ipad + MainStoryboard_iPad + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/example-clients/simple-sso-client/simple-sso-client/simple-sso-client-Prefix.pch b/example-clients/simple-sso-client/simple-sso-client/simple-sso-client-Prefix.pch new file mode 100644 index 0000000..d10a260 --- /dev/null +++ b/example-clients/simple-sso-client/simple-sso-client/simple-sso-client-Prefix.pch @@ -0,0 +1,14 @@ +// +// Prefix header for all source files of the 'simple-sso-client' target in the 'simple-sso-client' project +// + +#import + +#ifndef __IPHONE_5_0 +#warning "This project uses features only available in iOS SDK 5.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import +#endif