├── README.md ├── cordova_plugins.js ├── qq ├── android │ ├── QQLogin.java │ ├── mta-sdk-1.0.0.jar │ └── open_sdk.jar ├── docs │ ├── 1.Android_SDK_V2.2使用说明.doc │ ├── 2.Android_SDK_V2.2接口调用说明.doc │ ├── iOS SDK API使用说明.docx │ └── iOS SDK 环境搭建.docx ├── ios │ ├── QQLogin.h │ ├── QQLogin.m │ ├── TencentOpenAPI.framework │ │ ├── Headers │ │ │ ├── QQApi.h │ │ │ ├── QQApiInterface.h │ │ │ ├── QQApiInterfaceObject.h │ │ │ ├── TencentApiInterface.h │ │ │ ├── TencentMessageObject.h │ │ │ ├── TencentOAuth.h │ │ │ ├── TencentOAuthObject.h │ │ │ ├── WeiBoAPI.h │ │ │ ├── WeiyunAPI.h │ │ │ └── sdkdef.h │ │ └── TencentOpenAPI │ └── TencentOpenApi_IOS_Bundle.bundle │ │ ├── Info.plist │ │ ├── error.png │ │ ├── js.zip │ │ ├── local.html │ │ ├── public_key.der │ │ ├── qqicon.png │ │ └── success.png └── www │ └── plugins │ └── qqLogin.js ├── renren ├── android │ ├── RennSDK-Android.jar │ └── RenrenLogin.java ├── ios │ ├── RennSDK.bundle │ │ └── images │ │ │ ├── close.png │ │ │ └── close@2x.png │ ├── RennSDK.framework │ │ ├── Headers │ │ │ ├── RennAccessToken.h │ │ │ ├── RennAlbumService.h │ │ │ ├── RennAppService.h │ │ │ ├── RennBlogService.h │ │ │ ├── RennClient.h │ │ │ ├── RennCommentService.h │ │ │ ├── RennFeedService.h │ │ │ ├── RennFriendService.h │ │ │ ├── RennHttpRequest.h │ │ │ ├── RennLikeService.h │ │ │ ├── RennLoginService.h │ │ │ ├── RennNotificationService.h │ │ │ ├── RennParam.h │ │ │ ├── RennPhotoService.h │ │ │ ├── RennProfileService.h │ │ │ ├── RennSDK.h │ │ │ ├── RennService.h │ │ │ ├── RennShareService.h │ │ │ ├── RennStatusService.h │ │ │ ├── RennUbbService.h │ │ │ └── RennUserService.h │ │ └── RennSDK │ ├── RenrenLogin.h │ └── RenrenLogin.m └── www │ └── plugins │ └── renrenLogin.js ├── sso ├── config.xml ├── hooks │ └── README.md ├── platforms │ ├── android │ │ ├── .project │ │ ├── AndroidManifest.xml │ │ ├── CordovaLib │ │ │ ├── .project │ │ │ ├── AndroidManifest.xml │ │ │ ├── build.xml │ │ │ ├── local.properties │ │ │ ├── proguard-project.txt │ │ │ ├── project.properties │ │ │ └── src │ │ │ │ ├── com │ │ │ │ └── squareup │ │ │ │ │ └── okhttp │ │ │ │ │ ├── Address.java │ │ │ │ │ ├── Connection.java │ │ │ │ │ ├── ConnectionPool.java │ │ │ │ │ ├── Dispatcher.java │ │ │ │ │ ├── Failure.java │ │ │ │ │ ├── HttpResponseCache.java │ │ │ │ │ ├── Job.java │ │ │ │ │ ├── MediaType.java │ │ │ │ │ ├── OkAuthenticator.java │ │ │ │ │ ├── OkHttpClient.java │ │ │ │ │ ├── OkResponseCache.java │ │ │ │ │ ├── Request.java │ │ │ │ │ ├── Response.java │ │ │ │ │ ├── ResponseSource.java │ │ │ │ │ ├── Route.java │ │ │ │ │ ├── RouteDatabase.java │ │ │ │ │ ├── TunnelRequest.java │ │ │ │ │ └── internal │ │ │ │ │ ├── AbstractOutputStream.java │ │ │ │ │ ├── Base64.java │ │ │ │ │ ├── DiskLruCache.java │ │ │ │ │ ├── Dns.java │ │ │ │ │ ├── FaultRecoveringOutputStream.java │ │ │ │ │ ├── NamedRunnable.java │ │ │ │ │ ├── Platform.java │ │ │ │ │ ├── StrictLineReader.java │ │ │ │ │ ├── Util.java │ │ │ │ │ ├── http │ │ │ │ │ ├── AbstractHttpInputStream.java │ │ │ │ │ ├── HeaderParser.java │ │ │ │ │ ├── HttpAuthenticator.java │ │ │ │ │ ├── HttpDate.java │ │ │ │ │ ├── HttpEngine.java │ │ │ │ │ ├── HttpTransport.java │ │ │ │ │ ├── HttpURLConnectionImpl.java │ │ │ │ │ ├── HttpsEngine.java │ │ │ │ │ ├── HttpsURLConnectionImpl.java │ │ │ │ │ ├── OkResponseCacheAdapter.java │ │ │ │ │ ├── Policy.java │ │ │ │ │ ├── RawHeaders.java │ │ │ │ │ ├── RequestHeaders.java │ │ │ │ │ ├── ResponseHeaders.java │ │ │ │ │ ├── RetryableOutputStream.java │ │ │ │ │ ├── RouteSelector.java │ │ │ │ │ ├── SpdyTransport.java │ │ │ │ │ ├── Transport.java │ │ │ │ │ └── UnknownLengthHttpInputStream.java │ │ │ │ │ ├── spdy │ │ │ │ │ ├── ErrorCode.java │ │ │ │ │ ├── FrameReader.java │ │ │ │ │ ├── FrameWriter.java │ │ │ │ │ ├── HeadersMode.java │ │ │ │ │ ├── Hpack.java │ │ │ │ │ ├── Http20Draft06.java │ │ │ │ │ ├── IncomingStreamHandler.java │ │ │ │ │ ├── NameValueBlockReader.java │ │ │ │ │ ├── Ping.java │ │ │ │ │ ├── Settings.java │ │ │ │ │ ├── Spdy3.java │ │ │ │ │ ├── SpdyConnection.java │ │ │ │ │ ├── SpdyStream.java │ │ │ │ │ └── Variant.java │ │ │ │ │ └── tls │ │ │ │ │ ├── DistinguishedNameParser.java │ │ │ │ │ └── OkHostnameVerifier.java │ │ │ │ └── org │ │ │ │ └── apache │ │ │ │ └── cordova │ │ │ │ ├── App.java │ │ │ │ ├── AuthenticationToken.java │ │ │ │ ├── CallbackContext.java │ │ │ │ ├── Config.java │ │ │ │ ├── CordovaActivity.java │ │ │ │ ├── CordovaArgs.java │ │ │ │ ├── CordovaChromeClient.java │ │ │ │ ├── CordovaInterface.java │ │ │ │ ├── CordovaPlugin.java │ │ │ │ ├── CordovaResourceApi.java │ │ │ │ ├── CordovaWebView.java │ │ │ │ ├── CordovaWebViewClient.java │ │ │ │ ├── DirectoryManager.java │ │ │ │ ├── DroidGap.java │ │ │ │ ├── ExifHelper.java │ │ │ │ ├── ExposedJsApi.java │ │ │ │ ├── FileHelper.java │ │ │ │ ├── IceCreamCordovaWebViewClient.java │ │ │ │ ├── JSONUtils.java │ │ │ │ ├── LOG.java │ │ │ │ ├── LinearLayoutSoftKeyboardDetect.java │ │ │ │ ├── NativeToJsMessageQueue.java │ │ │ │ ├── PluginEntry.java │ │ │ │ ├── PluginManager.java │ │ │ │ ├── PluginResult.java │ │ │ │ ├── ScrollEvent.java │ │ │ │ └── Whitelist.java │ │ ├── assets │ │ │ ├── _where-is-www.txt │ │ │ └── www │ │ │ │ ├── cordova.js │ │ │ │ ├── cordova_plugins.js │ │ │ │ ├── css │ │ │ │ └── index.css │ │ │ │ ├── img │ │ │ │ └── logo.png │ │ │ │ ├── index.html │ │ │ │ └── js │ │ │ │ └── index.js │ │ ├── build.xml │ │ ├── cordova │ │ │ ├── android_sdk_version │ │ │ ├── build │ │ │ ├── build.bat │ │ │ ├── check_reqs │ │ │ ├── clean │ │ │ ├── clean.bat │ │ │ ├── defaults.xml │ │ │ ├── lib │ │ │ │ ├── android_sdk_version.js │ │ │ │ ├── appinfo.js │ │ │ │ ├── build.js │ │ │ │ ├── check_reqs.js │ │ │ │ ├── clean.js │ │ │ │ ├── device.js │ │ │ │ ├── emulator.js │ │ │ │ ├── exec.js │ │ │ │ ├── install-device │ │ │ │ ├── install-device.bat │ │ │ │ ├── install-emulator │ │ │ │ ├── install-emulator.bat │ │ │ │ ├── list-devices │ │ │ │ ├── list-devices.bat │ │ │ │ ├── list-emulator-images │ │ │ │ ├── list-emulator-images.bat │ │ │ │ ├── list-started-emulators │ │ │ │ ├── list-started-emulators.bat │ │ │ │ ├── log.js │ │ │ │ ├── run.js │ │ │ │ ├── spawn.js │ │ │ │ ├── start-emulator │ │ │ │ └── start-emulator.bat │ │ │ ├── log │ │ │ ├── log.bat │ │ │ ├── node_modules │ │ │ │ ├── .bin │ │ │ │ │ └── shjs │ │ │ │ ├── q │ │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── benchmark │ │ │ │ │ │ ├── compare-with-callbacks.js │ │ │ │ │ │ └── scenarios.js │ │ │ │ │ ├── package.json │ │ │ │ │ ├── q.js │ │ │ │ │ └── queue.js │ │ │ │ └── shelljs │ │ │ │ │ ├── .documentup.json │ │ │ │ │ ├── .jshintrc │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── bin │ │ │ │ │ └── shjs │ │ │ │ │ ├── global.js │ │ │ │ │ ├── make.js │ │ │ │ │ ├── package.json │ │ │ │ │ ├── scripts │ │ │ │ │ ├── generate-docs.js │ │ │ │ │ └── run-tests.js │ │ │ │ │ ├── shell.js │ │ │ │ │ └── src │ │ │ │ │ ├── cat.js │ │ │ │ │ ├── cd.js │ │ │ │ │ ├── chmod.js │ │ │ │ │ ├── common.js │ │ │ │ │ ├── cp.js │ │ │ │ │ ├── dirs.js │ │ │ │ │ ├── echo.js │ │ │ │ │ ├── error.js │ │ │ │ │ ├── exec.js │ │ │ │ │ ├── find.js │ │ │ │ │ ├── grep.js │ │ │ │ │ ├── ls.js │ │ │ │ │ ├── mkdir.js │ │ │ │ │ ├── mv.js │ │ │ │ │ ├── popd.js │ │ │ │ │ ├── pushd.js │ │ │ │ │ ├── pwd.js │ │ │ │ │ ├── rm.js │ │ │ │ │ ├── sed.js │ │ │ │ │ ├── tempdir.js │ │ │ │ │ ├── test.js │ │ │ │ │ ├── to.js │ │ │ │ │ ├── toEnd.js │ │ │ │ │ └── which.js │ │ │ ├── run │ │ │ ├── run.bat │ │ │ ├── version │ │ │ └── version.bat │ │ ├── custom_rules.xml │ │ ├── local.properties │ │ ├── platform_www │ │ │ └── cordova.js │ │ ├── proguard-project.txt │ │ ├── project.properties │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ └── icon.png │ │ │ ├── drawable-land-hdpi │ │ │ │ └── screen.png │ │ │ ├── drawable-land-ldpi │ │ │ │ └── screen.png │ │ │ ├── drawable-land-mdpi │ │ │ │ └── screen.png │ │ │ ├── drawable-land-xhdpi │ │ │ │ └── screen.png │ │ │ ├── drawable-ldpi │ │ │ │ └── icon.png │ │ │ ├── drawable-mdpi │ │ │ │ └── icon.png │ │ │ ├── drawable-port-hdpi │ │ │ │ └── screen.png │ │ │ ├── drawable-port-ldpi │ │ │ │ └── screen.png │ │ │ ├── drawable-port-mdpi │ │ │ │ └── screen.png │ │ │ ├── drawable-port-xhdpi │ │ │ │ └── screen.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── icon.png │ │ │ ├── drawable │ │ │ │ └── icon.png │ │ │ ├── values │ │ │ │ └── strings.xml │ │ │ └── xml │ │ │ │ └── config.xml │ │ └── src │ │ │ └── com │ │ │ └── example │ │ │ └── sso │ │ │ └── SSO.java │ └── ios │ │ ├── .gitignore │ │ ├── CordovaLib │ │ ├── Classes │ │ │ ├── CDV.h │ │ │ ├── CDVAvailability.h │ │ │ ├── CDVCommandDelegate.h │ │ │ ├── CDVCommandDelegateImpl.h │ │ │ ├── CDVCommandDelegateImpl.m │ │ │ ├── CDVCommandQueue.h │ │ │ ├── CDVCommandQueue.m │ │ │ ├── CDVConfigParser.h │ │ │ ├── CDVConfigParser.m │ │ │ ├── CDVDebug.h │ │ │ ├── CDVInvokedUrlCommand.h │ │ │ ├── CDVInvokedUrlCommand.m │ │ │ ├── CDVJSON.h │ │ │ ├── CDVJSON.m │ │ │ ├── CDVLocalStorage.h │ │ │ ├── CDVLocalStorage.m │ │ │ ├── CDVPlugin.h │ │ │ ├── CDVPlugin.m │ │ │ ├── CDVPluginResult.h │ │ │ ├── CDVPluginResult.m │ │ │ ├── CDVScreenOrientationDelegate.h │ │ │ ├── CDVShared.h │ │ │ ├── CDVShared.m │ │ │ ├── CDVTimer.h │ │ │ ├── CDVTimer.m │ │ │ ├── CDVURLProtocol.h │ │ │ ├── CDVURLProtocol.m │ │ │ ├── CDVUserAgentUtil.h │ │ │ ├── CDVUserAgentUtil.m │ │ │ ├── CDVViewController.h │ │ │ ├── CDVViewController.m │ │ │ ├── CDVWebViewDelegate.h │ │ │ ├── CDVWebViewDelegate.m │ │ │ ├── CDVWhitelist.h │ │ │ ├── CDVWhitelist.m │ │ │ ├── NSArray+Comparisons.h │ │ │ ├── NSArray+Comparisons.m │ │ │ ├── NSData+Base64.h │ │ │ ├── NSData+Base64.m │ │ │ ├── NSDictionary+Extensions.h │ │ │ ├── NSDictionary+Extensions.m │ │ │ ├── NSMutableArray+QueueAdditions.h │ │ │ ├── NSMutableArray+QueueAdditions.m │ │ │ ├── UIDevice+Extensions.h │ │ │ └── UIDevice+Extensions.m │ │ ├── CordovaLib.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcuserdata │ │ │ │ └── hpp.xcuserdatad │ │ │ │ └── xcschemes │ │ │ │ ├── CordovaLib.xcscheme │ │ │ │ └── xcschememanagement.plist │ │ ├── CordovaLib_Prefix.pch │ │ ├── VERSION │ │ └── cordova.js │ │ ├── RennSDK.bundle │ │ └── images │ │ │ ├── close.png │ │ │ └── close@2x.png │ │ ├── RennSDK.framework │ │ ├── Headers │ │ │ ├── RennAccessToken.h │ │ │ ├── RennAlbumService.h │ │ │ ├── RennAppService.h │ │ │ ├── RennBlogService.h │ │ │ ├── RennClient.h │ │ │ ├── RennCommentService.h │ │ │ ├── RennFeedService.h │ │ │ ├── RennFriendService.h │ │ │ ├── RennHttpRequest.h │ │ │ ├── RennLikeService.h │ │ │ ├── RennLoginService.h │ │ │ ├── RennNotificationService.h │ │ │ ├── RennParam.h │ │ │ ├── RennPhotoService.h │ │ │ ├── RennProfileService.h │ │ │ ├── RennSDK.h │ │ │ ├── RennService.h │ │ │ ├── RennShareService.h │ │ │ ├── RennStatusService.h │ │ │ ├── RennUbbService.h │ │ │ └── RennUserService.h │ │ └── RennSDK │ │ ├── SSO.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ ├── xcshareddata │ │ │ │ └── SSO.xccheckout │ │ │ └── xcuserdata │ │ │ │ └── hpp.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ └── hpp.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── SSO.xcscheme │ │ │ └── xcschememanagement.plist │ │ ├── SSO │ │ ├── .gitignore │ │ ├── Classes │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── MainViewController.h │ │ │ ├── MainViewController.m │ │ │ └── MainViewController.xib │ │ ├── Plugins │ │ │ ├── QQLogin.h │ │ │ ├── QQLogin.m │ │ │ ├── README │ │ │ ├── RenrenLogin.h │ │ │ ├── RenrenLogin.m │ │ │ ├── WeiboLogin.h │ │ │ └── WeiboLogin.m │ │ ├── Resources │ │ │ ├── de.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── en.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── es.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── icons │ │ │ │ ├── icon-40.png │ │ │ │ ├── icon-40@2x.png │ │ │ │ ├── icon-50.png │ │ │ │ ├── icon-50@2x.png │ │ │ │ ├── icon-60.png │ │ │ │ ├── icon-60@2x.png │ │ │ │ ├── icon-72.png │ │ │ │ ├── icon-72@2x.png │ │ │ │ ├── icon-76.png │ │ │ │ ├── icon-76@2x.png │ │ │ │ ├── icon-small.png │ │ │ │ ├── icon-small@2x.png │ │ │ │ ├── icon.png │ │ │ │ └── icon@2x.png │ │ │ ├── se.lproj │ │ │ │ └── Localizable.strings │ │ │ └── splash │ │ │ │ ├── Default-568h@2x~iphone.png │ │ │ │ ├── Default-Landscape@2x~ipad.png │ │ │ │ ├── Default-Landscape~ipad.png │ │ │ │ ├── Default-Portrait@2x~ipad.png │ │ │ │ ├── Default-Portrait~ipad.png │ │ │ │ ├── Default@2x~iphone.png │ │ │ │ └── Default~iphone.png │ │ ├── SSO-Info.plist │ │ ├── SSO-Prefix.pch │ │ ├── config.xml │ │ └── main.m │ │ ├── TencentOpenAPI.framework │ │ ├── Headers │ │ │ ├── QQApi.h │ │ │ ├── QQApiInterface.h │ │ │ ├── QQApiInterfaceObject.h │ │ │ ├── TencentApiInterface.h │ │ │ ├── TencentMessageObject.h │ │ │ ├── TencentOAuth.h │ │ │ ├── TencentOAuthObject.h │ │ │ ├── WeiBoAPI.h │ │ │ ├── WeiyunAPI.h │ │ │ └── sdkdef.h │ │ └── TencentOpenAPI │ │ ├── TencentOpenApi_IOS_Bundle.bundle │ │ ├── Info.plist │ │ ├── error.png │ │ ├── js.zip │ │ ├── local.html │ │ ├── public_key.der │ │ ├── qqicon.png │ │ └── success.png │ │ ├── cordova │ │ ├── apple_ios_version │ │ ├── apple_osx_version │ │ ├── apple_xcode_version │ │ ├── build │ │ ├── build.xcconfig │ │ ├── check_reqs │ │ ├── clean │ │ ├── defaults.xml │ │ ├── emulate │ │ ├── lib │ │ │ ├── copy-www-build-step.sh │ │ │ ├── install-device │ │ │ ├── install-emulator │ │ │ ├── list-devices │ │ │ ├── list-emulator-images │ │ │ ├── list-started-emulators │ │ │ ├── sim.applescript │ │ │ └── start-emulator │ │ ├── log │ │ ├── run │ │ └── version │ │ ├── libWeiboSDK │ │ ├── WeiboSDK.bundle │ │ │ └── images │ │ │ │ ├── close.png │ │ │ │ └── close@2x.png │ │ ├── WeiboSDK.h │ │ └── libWeiboSDK.a │ │ ├── platform_www │ │ └── cordova.js │ │ └── www │ │ ├── cordova.js │ │ ├── cordova_plugins.js │ │ ├── css │ │ └── index.css │ │ ├── img │ │ └── logo.png │ │ ├── index.html │ │ ├── js │ │ └── index.js │ │ └── plugins │ │ ├── com.example.cordova.qqLogin │ │ └── www │ │ │ └── qqLogin.js │ │ ├── com.example.cordova.renrenLogin │ │ └── www │ │ │ └── renrenLogin.js │ │ └── com.example.cordova.weiboLogin │ │ └── www │ │ └── weiboLogin.js ├── plugins │ ├── android.json │ └── ios.json └── www │ ├── css │ └── index.css │ ├── img │ └── logo.png │ ├── index.html │ └── js │ └── index.js └── weibo ├── android ├── WeiboLogin.java └── weibosdkcore.jar ├── docs ├── 微博Android平台SDK文档V2.4.0.pdf └── 微博IOS平台SDK文档V2.4.0.pdf ├── ios ├── WeiboLogin.h ├── WeiboLogin.m └── libWeiboSDK │ ├── WeiboSDK.bundle │ └── images │ │ ├── close.png │ │ └── close@2x.png │ ├── WeiboSDK.h │ └── libWeiboSDK.a └── www └── plugins └── weiboLogin.js /cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | mod 3 | { 4 | "file": "plugins/com.example.cordova.weiboLogin/www/weiboLogin.js", 5 | "id": "com.example.cordova.weiboLogin", 6 | "clobbers": [ 7 | "weiboLogin" 8 | ] 9 | }, { 10 | "file": "plugins/com.example.cordova.renrenLogin/www/renrenLogin.js", 11 | "id": "com.example.cordova.renrenLogin", 12 | "clobbers": [ 13 | "renrenLogin" 14 | ] 15 | }, { 16 | "file": "plugins/com.example.cordova.qqLogin/www/qqLogin.js", 17 | "id": "com.example.cordova.qqLogin", 18 | "clobbers": [ 19 | "qqLogin" 20 | ] 21 | } 22 | ]; 23 | module.exports.metadata = 24 | // TOP OF METADATA 25 | { 26 | 27 | } 28 | // BOTTOM OF METADATA 29 | }); -------------------------------------------------------------------------------- /qq/android/mta-sdk-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/android/mta-sdk-1.0.0.jar -------------------------------------------------------------------------------- /qq/android/open_sdk.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/android/open_sdk.jar -------------------------------------------------------------------------------- /qq/docs/1.Android_SDK_V2.2使用说明.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/docs/1.Android_SDK_V2.2使用说明.doc -------------------------------------------------------------------------------- /qq/docs/2.Android_SDK_V2.2接口调用说明.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/docs/2.Android_SDK_V2.2接口调用说明.doc -------------------------------------------------------------------------------- /qq/docs/iOS SDK API使用说明.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/docs/iOS SDK API使用说明.docx -------------------------------------------------------------------------------- /qq/docs/iOS SDK 环境搭建.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/docs/iOS SDK 环境搭建.docx -------------------------------------------------------------------------------- /qq/ios/QQLogin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | #import 23 | 24 | @interface QQLogin : CDVPlugin 25 | { 26 | TencentOAuth* _tencentOAuth; 27 | NSMutableArray* _permissions; 28 | 29 | } 30 | 31 | 32 | - (void)ssoLogin:(CDVInvokedUrlCommand*)command; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /qq/ios/TencentOpenAPI.framework/TencentOpenAPI: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/ios/TencentOpenAPI.framework/TencentOpenAPI -------------------------------------------------------------------------------- /qq/ios/TencentOpenApi_IOS_Bundle.bundle/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/ios/TencentOpenApi_IOS_Bundle.bundle/Info.plist -------------------------------------------------------------------------------- /qq/ios/TencentOpenApi_IOS_Bundle.bundle/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/ios/TencentOpenApi_IOS_Bundle.bundle/error.png -------------------------------------------------------------------------------- /qq/ios/TencentOpenApi_IOS_Bundle.bundle/js.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/ios/TencentOpenApi_IOS_Bundle.bundle/js.zip -------------------------------------------------------------------------------- /qq/ios/TencentOpenApi_IOS_Bundle.bundle/public_key.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/ios/TencentOpenApi_IOS_Bundle.bundle/public_key.der -------------------------------------------------------------------------------- /qq/ios/TencentOpenApi_IOS_Bundle.bundle/qqicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/ios/TencentOpenApi_IOS_Bundle.bundle/qqicon.png -------------------------------------------------------------------------------- /qq/ios/TencentOpenApi_IOS_Bundle.bundle/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/qq/ios/TencentOpenApi_IOS_Bundle.bundle/success.png -------------------------------------------------------------------------------- /qq/www/plugins/qqLogin.js: -------------------------------------------------------------------------------- 1 | cordova.define("com.example.cordova.qqLogin", function(require, exports, module) { 2 | /* 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | * 21 | */ 22 | var exec = require('cordova/exec'); 23 | 24 | module.exports = { 25 | ssoLogin: function(onSuccess,onFail) { 26 | exec(function(res){ 27 | onSuccess(res); 28 | },onFail, "QQLogin", "ssoLogin", []); 29 | }, 30 | ssoLogout: function(onSuccess,onFail) { 31 | exec(function(res){ 32 | onSuccess(res); 33 | },onFail, "QQLogin", "ssoLogout", []); 34 | } 35 | } 36 | }); 37 | 38 | 39 | -------------------------------------------------------------------------------- /renren/android/RennSDK-Android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/renren/android/RennSDK-Android.jar -------------------------------------------------------------------------------- /renren/android/RenrenLogin.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/renren/android/RenrenLogin.java -------------------------------------------------------------------------------- /renren/ios/RennSDK.bundle/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/renren/ios/RennSDK.bundle/images/close.png -------------------------------------------------------------------------------- /renren/ios/RennSDK.bundle/images/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/renren/ios/RennSDK.bundle/images/close@2x.png -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennAccessToken.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennAccessToken.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-17. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RennAccessToken : NSObject 12 | 13 | @property (nonatomic, copy) NSString * tokenType; 14 | @property (nonatomic, copy) NSString * accessToken; 15 | @property (nonatomic, copy) NSString * refreshToken; 16 | @property (nonatomic, copy) NSString * accessScope; 17 | @property (nonatomic, copy) NSString * macKey; 18 | @property (nonatomic, copy) NSString * macAlgorithm; 19 | @property (nonatomic, assign) NSInteger expiresIn; 20 | @property (nonatomic, assign) NSTimeInterval requestTime; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennAlbumService.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlbumService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern const NSString *kAccessControlPrivate; //仅自己可见 12 | extern const NSString *kAccessControlPublic; //所有人可见 13 | extern const NSString *kAccessControlPassword; //密码访问可见 14 | extern const NSString *kAccessControlFriend; //仅好友可见 15 | 16 | extern NSString *kRennServiceTypeGetAlbum; 17 | extern NSString *kRennServiceTypePutAlbum; 18 | extern NSString *kRennServiceTypeListAlbum; 19 | 20 | /* 21 | API链接: http://wiki.dev.renren.com/wiki/V2/album/get 22 | */ 23 | @interface GetAlbumParam : RennParam 24 | //必选 25 | @property (nonatomic, retain) NSString *albumId; 26 | //必选 27 | @property (nonatomic, retain) NSString *ownerId; 28 | 29 | @end 30 | 31 | /* 32 | API链接: http://wiki.dev.renren.com/wiki/V2/album/put 33 | */ 34 | @interface PutAlbumParam : RennParam 35 | //可选 36 | @property (nonatomic, retain) NSString *location; 37 | //可选 38 | @property (nonatomic, retain) NSString *description; 39 | //必选 40 | @property (nonatomic, retain) NSString *name; 41 | //可选 42 | @property (nonatomic, retain) NSString *accessControl; 43 | //可选 44 | @property (nonatomic, retain) NSString *password; 45 | 46 | @end 47 | 48 | /* 49 | API链接: http://wiki.dev.renren.com/wiki/V2/album/list 50 | */ 51 | @interface ListAlbumParam : RennParam 52 | //必选 53 | @property (nonatomic, retain) NSString *ownerId; 54 | //可选 55 | @property (nonatomic, assign) NSInteger pageSize; 56 | //可选 57 | @property (nonatomic, assign) NSInteger pageNumber; 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennAppService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennAppService.h 3 | // RennSDK 4 | // 5 | // Created by 杨 飞 on 13-5-13. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeGetApp; 12 | 13 | /* 14 | API链接: http://wiki.dev.renren.com/wiki/V2/app/get 15 | */ 16 | @interface GetAppParam : RennParam 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennBlogService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennBlogService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern const NSString *kTypeGetBlog; 12 | extern const NSString *kTypePutBlog; 13 | extern const NSString *kTypeListBlog; 14 | 15 | /* 16 | API链接: http://wiki.dev.renren.com/wiki/V2/blog/get 17 | */ 18 | @interface GetBlogParam : RennParam 19 | //必选 20 | @property (nonatomic, retain) NSString *blogId; 21 | //必选 22 | @property (nonatomic, retain) NSString *ownerId; 23 | //可选 24 | @property (nonatomic, retain) NSString *password; 25 | 26 | @end 27 | 28 | /* 29 | API链接: http://wiki.dev.renren.com/wiki/V2/blog/put 30 | */ 31 | @interface PutBlogParam : RennParam 32 | //必选 33 | @property (nonatomic, retain) NSString *title; 34 | //可选 35 | @property (nonatomic, retain) NSString *accessControl; 36 | //可选 37 | @property (nonatomic, retain) NSString *password; 38 | //必选 39 | @property (nonatomic, retain) NSString *content; 40 | 41 | @end 42 | 43 | /* 44 | API链接: http://wiki.dev.renren.com/wiki/V2/blog/list 45 | */ 46 | @interface ListBlogParam : RennParam 47 | //必选 48 | @property (nonatomic, retain) NSString *ownerId; 49 | //可选 50 | @property (nonatomic, assign) NSInteger pageSize; 51 | //必选 52 | @property (nonatomic, assign) NSInteger pageNumber; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennCommentService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennCommentService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-17. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kCommentTypeBlog; 12 | extern NSString *kCommentTypeStatus; 13 | extern NSString *kCommentTypePhoto; 14 | extern NSString *kCommentTypeShare; 15 | extern NSString *kCommentTypeAlbum; 16 | 17 | extern NSString *kRennServiceTypePutComment; 18 | extern NSString *kRennServiceTypeListComment; 19 | 20 | /* 21 | API链接: http://wiki.dev.renren.com/wiki/V2/comment/put 22 | */ 23 | @interface PutCommentParam : RennParam 24 | //必选 25 | @property (nonatomic, retain) NSString *entryOwnerId; 26 | //必选 27 | @property (nonatomic, retain) NSString *entryId; 28 | //必选 29 | @property (nonatomic, retain) NSString *commentType; 30 | //可选 31 | @property (nonatomic, retain) NSString *targetUserId; 32 | //必选 33 | @property (nonatomic, retain) NSString *content; 34 | 35 | @end 36 | 37 | /* 38 | API链接: http://wiki.dev.renren.com/wiki/V2/comment/list 39 | */ 40 | @interface ListCommentParam : RennParam 41 | //必选 42 | @property (nonatomic, retain) NSString *entryOwnerId; 43 | //必选 44 | @property (nonatomic, retain) NSString *entryId; 45 | //必选 46 | @property (nonatomic, retain) NSString *commentType; 47 | //可选 48 | @property (nonatomic, assign) NSInteger pageSize; 49 | //可选 50 | @property (nonatomic, assign) NSInteger pageNumber; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennFeedService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennFeedService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypePutFeed; 12 | extern NSString *kRennServiceTypeListFeed; 13 | 14 | /* 15 | API链接: http://wiki.dev.renren.com/wiki/V2/feed/put 16 | */ 17 | @interface PutFeedParam : RennParam 18 | //必选 19 | @property (nonatomic, retain) NSString *message; 20 | //必选 21 | @property (nonatomic, retain) NSString *title; 22 | //可选 23 | @property (nonatomic, retain) NSString *actionTargetUrl; 24 | //可选 25 | @property (nonatomic, retain) NSString *imageUrl; 26 | //必选 27 | @property (nonatomic, retain) NSString *description; 28 | //可选 29 | @property (nonatomic, retain) NSString *subtitle; 30 | //可选 31 | @property (nonatomic, retain) NSString *actionName; 32 | //必选 33 | @property (nonatomic, retain) NSString *targetUrl; 34 | 35 | @end 36 | 37 | 38 | /* 39 | API链接: http://wiki.dev.renren.com/wiki/V2/feed/list 40 | */ 41 | @interface ListFeedParam : RennParam 42 | //可选 43 | @property (nonatomic, retain) NSString *feedType; 44 | //可选 45 | @property (nonatomic, retain) NSString *userId; 46 | //可选 47 | @property (nonatomic, assign) NSInteger pageSize; 48 | //可选 49 | @property (nonatomic, assign) NSInteger pageNumber; 50 | 51 | @end 52 | 53 | 54 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennFriendService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennFriendService.h 3 | // RennSDK 4 | // 5 | // Created by 杨 飞 on 13-5-13. 6 | // Copyright (c) 2013年 YangFei. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeListFriend; 12 | 13 | 14 | 15 | /* 16 | API链接: http://wiki.dev.renren.com/wiki/V2/friend/list 17 | */ 18 | @interface ListFriendParam : RennParam 19 | 20 | //可选 21 | @property (nonatomic, retain) NSString *userId; 22 | 23 | //可选 24 | @property (nonatomic, assign) NSInteger pageSize; 25 | 26 | //可选 27 | @property (nonatomic, assign) NSInteger pageNumber; 28 | 29 | @end 30 | 31 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennHttpRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennHttpRequest.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-8. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define API_SERVER @"api.renren.com" 12 | #define API_PORT @"80" 13 | 14 | @class RennHttpRequest; 15 | 16 | @protocol RennHttpRequestDelegate 17 | 18 | - (void)request:(RennHttpRequest *)request responseWithData:(NSData *)data; 19 | 20 | - (void)request:(RennHttpRequest *)request failWithError:(NSError *)error; 21 | 22 | @end 23 | 24 | @interface RennHttpRequest : NSObject 25 | 26 | @property (retain, nonatomic) id delegate; 27 | 28 | @property (assign, nonatomic) NSTimeInterval timeoutInterval; 29 | 30 | @property (retain, nonatomic) NSString *httpMethod; 31 | @property (retain, nonatomic) NSURL *URL; 32 | @property (retain, nonatomic) NSDictionary *param; 33 | @property (retain, nonatomic) NSDictionary *data; 34 | @property (retain, nonatomic) NSString *ua; 35 | 36 | - (id)initWithURL:(NSURL *)newURL param:(NSDictionary *)param; 37 | 38 | - (id)initWithPath:(NSString *)path param:(NSDictionary *)param; 39 | 40 | - (void)startAsynchronous; 41 | 42 | - (void)clearDelegateAndCancel; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennLoginService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennLoginService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * @description 第三方应用需实现此协议,登录时传入此类对象,用于完成登录结果的回调 13 | */ 14 | @protocol RennLoginDelegate 15 | 16 | @optional 17 | 18 | - (void)rennLoginSuccess; 19 | - (void)rennLogoutSuccess; 20 | - (void)rennLoginCancelded; 21 | - (void)rennLoginDidFailWithError:(NSError *)error; 22 | - (void)rennLoginAccessTokenInvalidOrExpired:(NSError *)error; 23 | 24 | @end 25 | 26 | @interface RennLoginService : NSObject 27 | 28 | @property (nonatomic, assign) id delegate; 29 | 30 | @property (nonatomic, retain) NSString *appId; 31 | @property (nonatomic, retain) NSString *apiKey; 32 | @property (nonatomic, retain) NSString *scope; 33 | @property (nonatomic, retain) NSString *secretKey; 34 | @property (nonatomic, retain) NSString *tokenType; 35 | 36 | @property (nonatomic, assign) BOOL enableSSO; 37 | 38 | + (RennLoginService *)sharedRennLoginService; 39 | 40 | - (void)login; 41 | 42 | - (void)logout; 43 | 44 | - (BOOL)handleOpenURL:(NSURL *)url; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennNotificationService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennNotificationService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypePutNotificationAsUser; 12 | extern NSString *kRennServiceTypePutNotificationAsApp; 13 | 14 | /* 15 | API链接: http://wiki.dev.renren.com/wiki/V2/notification/user/put 16 | */ 17 | @interface PutNotificationAsUserParam : RennParam 18 | //必选 19 | @property (nonatomic, retain) NSString *content; 20 | //必选 21 | @property (nonatomic, retain) NSArray *userIds; 22 | 23 | @end 24 | 25 | /* 26 | API链接: http://wiki.dev.renren.com/wiki/V2/notification/app/put 27 | */ 28 | @interface PutNotificationAsAppParam : RennParam 29 | //必选 30 | @property (nonatomic, retain) NSString *content; 31 | //必选 32 | @property (nonatomic, retain) NSArray *userIds; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennParam.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennParam.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-17. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RennParam : NSObject 12 | { 13 | NSString *_type; 14 | NSString *_path; 15 | NSString *_method; 16 | } 17 | 18 | - (id)initWithType:(NSString *)type path:(NSString *)path method:(NSString *)method; 19 | 20 | - (NSString *)type; 21 | 22 | - (NSString *)path; 23 | 24 | - (NSString *)method; 25 | 26 | - (NSDictionary *)toDictionary; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennPhotoService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennPhotoService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeGetPhoto; 12 | extern NSString *kRennServiceTypeUploadPhoto; 13 | extern NSString *kRennServiceTypeListPhoto; 14 | 15 | /* 16 | API链接: http://wiki.dev.renren.com/wiki/V2/photo/get 17 | */ 18 | @interface GetPhotoParam : RennParam 19 | //可选 20 | @property (nonatomic, retain) NSString *albumId; 21 | //必选 22 | @property (nonatomic, retain) NSString *photoId; 23 | //必选 24 | @property (nonatomic, retain) NSString *ownerId; 25 | //可选 26 | @property (nonatomic, retain) NSString *password; 27 | 28 | @end 29 | 30 | /* 31 | API链接: http://wiki.dev.renren.com/wiki/V2/photo/upload 32 | */ 33 | @interface UploadPhotoParam : RennParam 34 | //必选 35 | @property (nonatomic, retain) NSString *albumId; 36 | //可选 37 | @property (nonatomic, retain) NSString *description; 38 | //可选 39 | @property (nonatomic, retain) NSData *file; 40 | 41 | @end 42 | 43 | /* 44 | API链接: http://wiki.dev.renren.com/wiki/V2/photo/list 45 | */ 46 | @interface ListPhotoParam : RennParam 47 | //必选 48 | @property (nonatomic, retain) NSString *albumId; 49 | //必选 50 | @property (nonatomic, retain) NSString *ownerId; 51 | //可选 52 | @property (nonatomic, retain) NSString *password; 53 | //可选 54 | @property (nonatomic, assign) NSInteger pageSize; 55 | //可选 56 | @property (nonatomic, assign) NSInteger pageNumber; 57 | 58 | @end 59 | 60 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennProfileService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennProfileService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeGetProfile; 12 | 13 | /* 14 | API链接: http://wiki.dev.renren.com/wiki/V2/profile/get 15 | */ 16 | @interface GetProfileParam : RennParam 17 | //必选 18 | @property (nonatomic, retain) NSString *userId; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennSDK.h: -------------------------------------------------------------------------------- 1 | 2 | #import "RennClient.h" 3 | #import "RennAppService.h" 4 | #import "RennLikeService.h" 5 | #import "RennBlogService.h" 6 | #import "RennAlbumService.h" 7 | #import "RennCommentService.h" 8 | #import "RennFeedService.h" 9 | #import "RennNotificationService.h" 10 | #import "RennPhotoService.h" 11 | #import "RennProfileService.h" 12 | #import "RennShareService.h" 13 | #import "RennStatusService.h" 14 | #import "RennUbbService.h" 15 | #import "RennUserService.h" 16 | #import "RennFriendService.h" 17 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-8. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RennHttpRequest.h" 11 | #import "RennParam.h" 12 | 13 | @class RennService; 14 | 15 | @protocol RennServiveDelegate 16 | 17 | @optional 18 | 19 | - (void)rennService:(RennService *)service requestSuccessWithResponse:(id)response; 20 | 21 | - (void)rennService:(RennService *)service requestFailWithError:(NSError*)error; 22 | 23 | @end 24 | 25 | @interface RennService : NSObject 26 | 27 | @property (nonatomic, retain) RennHttpRequest *request; 28 | @property (nonatomic, retain) NSString *type; 29 | @property (nonatomic, readonly) id delegate; 30 | 31 | - (id)initWithDelegate:(id)delegate; 32 | 33 | - (void)clearDelegateAndCancel; 34 | 35 | - (void)sendAsynRequest:(RennParam *)param; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennStatusService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennStatusService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeGetStatus; 12 | extern NSString *kRennServiceTypePutStatus; 13 | extern NSString *kRennServiceTypeListStatus; 14 | extern NSString *kRennServiceTypeShareStatus; 15 | 16 | /* 17 | API链接: http://wiki.dev.renren.com/wiki/V2/status/get 18 | */ 19 | @interface GetStatusParam : RennParam 20 | //必选 21 | @property (nonatomic, retain) NSString *statusId; 22 | //必选 23 | @property (nonatomic, retain) NSString *ownerId; 24 | 25 | @end 26 | 27 | /* 28 | API链接: http://wiki.dev.renren.com/wiki/V2/status/put 29 | */ 30 | @interface PutStatusParam : RennParam 31 | //必选 32 | @property (nonatomic, retain) NSString *content; 33 | 34 | @end 35 | 36 | /* 37 | API链接: http://wiki.dev.renren.com/wiki/V2/status/list 38 | */ 39 | @interface ListStatusParam : RennParam 40 | //必选 41 | @property (nonatomic, retain) NSString *ownerId; 42 | //可选 43 | @property (nonatomic, assign) NSInteger pageSize; 44 | //可选 45 | @property (nonatomic, assign) NSInteger pageNumber; 46 | 47 | @end 48 | 49 | /* 50 | API链接: http://wiki.dev.renren.com/wiki/V2/status/share 51 | */ 52 | @interface ShareStatusParam : RennParam 53 | //必选 54 | @property (nonatomic, retain) NSString *content; 55 | //必选 56 | @property (nonatomic, retain) NSString *statusId; 57 | //必选 58 | @property (nonatomic, retain) NSString *ownerId; 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/Headers/RennUbbService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennUbbService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeListUbb; 12 | 13 | /* 14 | API链接: http://wiki.dev.renren.com/wiki/V2/ubb/list 15 | */ 16 | @interface ListUbbParam : RennParam 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /renren/ios/RennSDK.framework/RennSDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/renren/ios/RennSDK.framework/RennSDK -------------------------------------------------------------------------------- /renren/ios/RenrenLogin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | @interface RenrenLogin : CDVPlugin 24 | {} 25 | 26 | 27 | - (void)ssoLogin:(CDVInvokedUrlCommand*)command; 28 | - (void)ssoLogout:(CDVInvokedUrlCommand*)command; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /renren/www/plugins/renrenLogin.js: -------------------------------------------------------------------------------- 1 | cordova.define("com.example.cordova.renrenLogin", function(require, exports, module) { 2 | /* 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | * 21 | */ 22 | var exec = require('cordova/exec'); 23 | 24 | module.exports = { 25 | ssoLogin: function(onSuccess,onFail) { 26 | exec(function(res){ 27 | onSuccess(res); 28 | },onFail, "RenrenLogin", "ssoLogin", []); 29 | }, 30 | ssoLogout: function(onSuccess,onFail) { 31 | exec(function(res){ 32 | onSuccess(res); 33 | },onFail, "RenrenLogin", "ssoLogout", []); 34 | } 35 | } 36 | }); 37 | 38 | 39 | -------------------------------------------------------------------------------- /sso/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SSO 4 | 5 | A sample Apache Cordova application that responds to the deviceready event. 6 | 7 | 8 | Apache Cordova Team 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /sso/platforms/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/.project: -------------------------------------------------------------------------------- 1 | SSO-CordovaLib -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/local.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must *NOT* be checked into Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | 7 | # location of the SDK. This is only used by Ant 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | sdk.dir=/Users/hpp/coding/adt-bundle-mac-x86_64-20131030/sdk 11 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Indicates whether an apk should be generated for each density. 11 | split.density=false 12 | # Project target. 13 | target=android-19 14 | apk-configurations= 15 | renderscript.opt.level=O0 16 | android.library=true 17 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/src/com/squareup/okhttp/ResponseSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.squareup.okhttp; 17 | 18 | /** The source of an HTTP response. */ 19 | public enum ResponseSource { 20 | 21 | /** The response was returned from the local cache. */ 22 | CACHE, 23 | 24 | /** 25 | * The response is available in the cache but must be validated with the 26 | * network. The cache result will be used if it is still valid; otherwise 27 | * the network's response will be used. 28 | */ 29 | CONDITIONAL_CACHE, 30 | 31 | /** The response was returned from the network. */ 32 | NETWORK; 33 | 34 | public boolean requiresConnection() { 35 | return this == CONDITIONAL_CACHE || this == NETWORK; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/src/com/squareup/okhttp/internal/AbstractOutputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.squareup.okhttp.internal; 18 | 19 | import java.io.IOException; 20 | import java.io.OutputStream; 21 | 22 | /** 23 | * An output stream for an HTTP request body. 24 | * 25 | *

Since a single socket's output stream may be used to write multiple HTTP 26 | * requests to the same server, subclasses should not close the socket stream. 27 | */ 28 | public abstract class AbstractOutputStream extends OutputStream { 29 | protected boolean closed; 30 | 31 | @Override public final void write(int data) throws IOException { 32 | write(new byte[] { (byte) data }); 33 | } 34 | 35 | protected final void checkNotClosed() throws IOException { 36 | if (closed) { 37 | throw new IOException("stream closed"); 38 | } 39 | } 40 | 41 | /** Returns true if this stream was closed locally. */ 42 | public boolean isClosed() { 43 | return closed; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/src/com/squareup/okhttp/internal/Dns.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.squareup.okhttp.internal; 17 | 18 | import java.net.InetAddress; 19 | import java.net.UnknownHostException; 20 | 21 | /** 22 | * Domain name service. Prefer this over {@link InetAddress#getAllByName} to 23 | * make code more testable. 24 | */ 25 | public interface Dns { 26 | Dns DEFAULT = new Dns() { 27 | @Override public InetAddress[] getAllByName(String host) throws UnknownHostException { 28 | return InetAddress.getAllByName(host); 29 | } 30 | }; 31 | 32 | InetAddress[] getAllByName(String host) throws UnknownHostException; 33 | } 34 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/src/com/squareup/okhttp/internal/NamedRunnable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.squareup.okhttp.internal; 18 | 19 | /** 20 | * Runnable implementation which always sets its thread name. 21 | */ 22 | public abstract class NamedRunnable implements Runnable { 23 | private final String name; 24 | 25 | public NamedRunnable(String format, Object... args) { 26 | this.name = String.format(format, args); 27 | } 28 | 29 | @Override public final void run() { 30 | String oldName = Thread.currentThread().getName(); 31 | Thread.currentThread().setName(name); 32 | try { 33 | execute(); 34 | } finally { 35 | Thread.currentThread().setName(oldName); 36 | } 37 | } 38 | 39 | protected abstract void execute(); 40 | } 41 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/src/com/squareup/okhttp/internal/spdy/IncomingStreamHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.squareup.okhttp.internal.spdy; 18 | 19 | import java.io.IOException; 20 | 21 | /** Listener to be notified when a connected peer creates a new stream. */ 22 | public interface IncomingStreamHandler { 23 | IncomingStreamHandler REFUSE_INCOMING_STREAMS = new IncomingStreamHandler() { 24 | @Override public void receive(SpdyStream stream) throws IOException { 25 | stream.close(ErrorCode.REFUSED_STREAM); 26 | } 27 | }; 28 | 29 | /** 30 | * Handle a new stream from this connection's peer. Implementations should 31 | * respond by either {@link SpdyStream#reply replying to the stream} or 32 | * {@link SpdyStream#close closing it}. This response does not need to be 33 | * synchronous. 34 | */ 35 | void receive(SpdyStream stream) throws IOException; 36 | } 37 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/src/com/squareup/okhttp/internal/spdy/Variant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.squareup.okhttp.internal.spdy; 17 | 18 | import java.io.InputStream; 19 | import java.io.OutputStream; 20 | 21 | /** A version and dialect of the framed socket protocol. */ 22 | interface Variant { 23 | Variant SPDY3 = new Spdy3(); 24 | Variant HTTP_20_DRAFT_06 = new Http20Draft06(); 25 | 26 | /** 27 | * @param client true if this is the HTTP client's reader, reading frames from 28 | * a peer SPDY or HTTP/2 server. 29 | */ 30 | FrameReader newReader(InputStream in, boolean client); 31 | 32 | /** 33 | * @param client true if this is the HTTP client's writer, writing frames to a 34 | * peer SPDY or HTTP/2 server. 35 | */ 36 | FrameWriter newWriter(OutputStream out, boolean client); 37 | } 38 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/src/org/apache/cordova/DroidGap.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova; 21 | 22 | /** 23 | * This used to be the class that should be extended by application 24 | * developers, but everything has been moved to CordovaActivity. So 25 | * you should extend CordovaActivity instead of DroidGap. This class 26 | * will be removed at a future time. 27 | * 28 | * @see CordovaActivity 29 | * @deprecated 30 | */ 31 | @Deprecated 32 | public class DroidGap extends CordovaActivity { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /sso/platforms/android/CordovaLib/src/org/apache/cordova/JSONUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | import org.json.JSONArray; 25 | import org.json.JSONException; 26 | 27 | @Deprecated // Deprecated in 3.1. To be removed in 4.0. 28 | public class JSONUtils { 29 | public static List toStringList(JSONArray array) throws JSONException { 30 | if(array == null) { 31 | return null; 32 | } 33 | else { 34 | List list = new ArrayList(); 35 | 36 | for (int i = 0; i < array.length(); i++) { 37 | list.add(array.get(i).toString()); 38 | } 39 | 40 | return list; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /sso/platforms/android/assets/_where-is-www.txt: -------------------------------------------------------------------------------- 1 | To show `assets/www` or `res/xml/config.xml`, go to: 2 | Project -> Properties -> Resource -> Resource Filters 3 | And delete the exclusion filter. 4 | -------------------------------------------------------------------------------- /sso/platforms/android/assets/www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = []; 3 | module.exports.metadata = 4 | // TOP OF METADATA 5 | {} 6 | // BOTTOM OF METADATA 7 | }); -------------------------------------------------------------------------------- /sso/platforms/android/assets/www/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/assets/www/img/logo.png -------------------------------------------------------------------------------- /sso/platforms/android/cordova/android_sdk_version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var android_sdk_version = require('./lib/android_sdk_version'); 23 | 24 | android_sdk_version.run().done(null, function(err) { 25 | console.log(err); 26 | process.exit(2); 27 | }); 28 | 29 | 30 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var build = require('./lib/build'), 23 | reqs = require('./lib/check_reqs'), 24 | args = process.argv; 25 | 26 | // Support basic help commands 27 | if(args[2] == '--help' || args[2] == '/?' || args[2] == '-h' || 28 | args[2] == 'help' || args[2] == '-help' || args[2] == '/help') { 29 | build.help(); 30 | } else { 31 | reqs.run().then(function() { 32 | return build.run(args[2]); 33 | }).done(null, function(err) { 34 | console.error(err); 35 | process.exit(2); 36 | }); 37 | } 38 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/build.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0build" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'build' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /sso/platforms/android/cordova/check_reqs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var check_reqs = require('./lib/check_reqs'); 23 | 24 | check_reqs.run().done( 25 | function success() { 26 | console.log('Looks like your environment fully supports cordova-android development!'); 27 | }, function fail(err) { 28 | console.log(err); 29 | process.exit(2); 30 | } 31 | ); 32 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/clean: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var clean = require('./lib/clean'), 23 | reqs = require('./lib/check_reqs'), 24 | args = process.argv; 25 | 26 | // Usage support for when args are given 27 | if(args.length > 2) { 28 | clean.help(); 29 | } else { 30 | reqs.run().done(function() { 31 | return clean.run(); 32 | }, function(err) { 33 | console.error('ERROR: ' + err); 34 | process.exit(2); 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/clean.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0clean" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'clean' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /sso/platforms/android/cordova/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/clean.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var build = require('./build'), 23 | spawn = require('./spawn'), 24 | path = require('path'); 25 | 26 | /* 27 | * Cleans the project using ant 28 | * Returns a promise. 29 | */ 30 | module.exports.run = function() { 31 | var args = build.getAntArgs('clean'); 32 | return spawn('ant', args); 33 | } 34 | 35 | module.exports.help = function() { 36 | console.log('Usage: ' + path.relative(process.cwd(), process.argv[1])); 37 | console.log('Cleans the project directory.'); 38 | process.exit(0); 39 | } 40 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/install-device.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0install-device" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'install-device' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/install-emulator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulator = require('./emulator'), 23 | args = process.argv; 24 | 25 | var install_target; 26 | if(args.length > 2) { 27 | if (args[2].substring(0, 9) == '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | } else { 30 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 31 | process.exit(2); 32 | } 33 | } 34 | 35 | emulator.install(install_target).done(null, function(err) { 36 | console.error('ERROR: ' + err); 37 | process.exit(2); 38 | }); 39 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/install-emulator.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0install-emulator" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'install-emulator' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/list-devices: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var devices = require('./device'); 23 | 24 | // Usage support for when args are given 25 | devices.list().done(function(device_list) { 26 | device_list && device_list.forEach(function(dev) { 27 | console.log(dev); 28 | }); 29 | }, function(err) { 30 | console.error('ERROR: ' + err); 31 | process.exit(2); 32 | }); 33 | 34 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/list-devices.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-devices" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-devices' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/list-emulator-images: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulators = require('./emulator'); 23 | 24 | // Usage support for when args are given 25 | emulators.list_images().done(function(emulator_list) { 26 | emulator_list && emulator_list.forEach(function(emu) { 27 | console.log(emu.name); 28 | }); 29 | }, function(err) { 30 | console.error('ERROR: ' + err); 31 | process.exit(2); 32 | }); 33 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/list-emulator-images.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-emulator-images" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-emulator-images' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/list-started-emulators: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulators = require('./emulator'); 23 | 24 | // Usage support for when args are given 25 | emulators.list_started().done(function(emulator_list) { 26 | emulator_list && emulator_list.forEach(function(emu) { 27 | console.log(emu); 28 | }); 29 | }, function(err) { 30 | console.error('ERROR: ' + err); 31 | process.exit(2); 32 | }); 33 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/list-started-emulators.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-started-emulators" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-started-emulators' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/start-emulator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulator = require('./emulator'), 23 | args = process.argv; 24 | 25 | var install_target; 26 | if(args.length > 2) { 27 | if (args[2].substring(0, 9) == '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | } else { 30 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 31 | process.exit(2); 32 | } 33 | } 34 | 35 | emulator.start(install_target).done(null, function(err) { 36 | console.error('ERROR: ' + err); 37 | process.exit(2); 38 | }); 39 | 40 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/lib/start-emulator.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0start-emulator" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'start-emulator' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /sso/platforms/android/cordova/log: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var log = require('./lib/log'), 23 | reqs = require('./lib/check_reqs'), 24 | args = process.argv; 25 | 26 | // Usage support for when args are given 27 | if(args.length > 2) { 28 | log.help(); 29 | } else { 30 | reqs.run().done(function() { 31 | return log.run(); 32 | }, function(err) { 33 | console.error('ERROR: ' + err); 34 | process.exit(2); 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/log.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0log" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'log' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/.bin/shjs: -------------------------------------------------------------------------------- 1 | ../shelljs/bin/shjs -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/q/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright 2009–2012 Kristopher Michael Kowal. All rights reserved. 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to 5 | deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/q/benchmark/scenarios.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var Q = require("../q"); 4 | 5 | suite("Chaining", function () { 6 | var numberToChain = 1000; 7 | 8 | bench("Chaining many already-fulfilled promises together", function (done) { 9 | var currentPromise = Q(); 10 | for (var i = 0; i < numberToChain; ++i) { 11 | currentPromise = currentPromise.then(function () { 12 | return Q(); 13 | }); 14 | } 15 | 16 | currentPromise.then(done); 17 | }); 18 | 19 | bench("Chaining and then fulfilling the end of the chain", function (done) { 20 | var deferred = Q.defer(); 21 | 22 | var currentPromise = deferred.promise; 23 | for (var i = 0; i < numberToChain; ++i) { 24 | (function () { 25 | var promiseToReturn = currentPromise; 26 | currentPromise = Q().then(function () { 27 | return promiseToReturn; 28 | }); 29 | }()); 30 | } 31 | 32 | currentPromise.then(done); 33 | 34 | deferred.resolve(); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/q/queue.js: -------------------------------------------------------------------------------- 1 | 2 | var Q = require("./q"); 3 | 4 | module.exports = Queue; 5 | function Queue() { 6 | var ends = Q.defer(); 7 | var closed = Q.defer(); 8 | return { 9 | put: function (value) { 10 | var next = Q.defer(); 11 | ends.resolve({ 12 | head: value, 13 | tail: next.promise 14 | }); 15 | ends.resolve = next.resolve; 16 | }, 17 | get: function () { 18 | var result = ends.promise.get("head"); 19 | ends.promise = ends.promise.get("tail"); 20 | return result.fail(function (error) { 21 | closed.resolve(error); 22 | throw error; 23 | }); 24 | }, 25 | closed: closed.promise, 26 | close: function (error) { 27 | error = error || new Error("Can't get value from closed queue"); 28 | var end = {head: Q.reject(error)}; 29 | end.tail = end; 30 | ends.resolve(end); 31 | return closed.promise; 32 | } 33 | }; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/.documentup.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ShellJS", 3 | "twitter": [ 4 | "r2r" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "loopfunc": true, 3 | "sub": true, 4 | "undef": true, 5 | "unused": true, 6 | "node": true 7 | } -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | tmp/ -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | - "0.11" 6 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/bin/shjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../global'); 3 | 4 | if (process.argv.length < 3) { 5 | console.log('ShellJS: missing argument (script name)'); 6 | console.log(); 7 | process.exit(1); 8 | } 9 | 10 | var args, 11 | scriptName = process.argv[2]; 12 | env['NODE_PATH'] = __dirname + '/../..'; 13 | 14 | if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) { 15 | if (test('-f', scriptName + '.js')) 16 | scriptName += '.js'; 17 | if (test('-f', scriptName + '.coffee')) 18 | scriptName += '.coffee'; 19 | } 20 | 21 | if (!test('-f', scriptName)) { 22 | console.log('ShellJS: script not found ('+scriptName+')'); 23 | console.log(); 24 | process.exit(1); 25 | } 26 | 27 | args = process.argv.slice(3); 28 | 29 | for (var i = 0, l = args.length; i < l; i++) { 30 | if (args[i][0] !== "-"){ 31 | args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words 32 | } 33 | } 34 | 35 | if (scriptName.match(/\.coffee$/)) { 36 | // 37 | // CoffeeScript 38 | // 39 | if (which('coffee')) { 40 | exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true }); 41 | } else { 42 | console.log('ShellJS: CoffeeScript interpreter not found'); 43 | console.log(); 44 | process.exit(1); 45 | } 46 | } else { 47 | // 48 | // JavaScript 49 | // 50 | exec('node ' + scriptName + ' ' + args.join(' '), { async: true }); 51 | } 52 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/global.js: -------------------------------------------------------------------------------- 1 | var shell = require('./shell.js'); 2 | for (var cmd in shell) 3 | global[cmd] = shell[cmd]; 4 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/make.js: -------------------------------------------------------------------------------- 1 | require('./global'); 2 | 3 | global.config.fatal = true; 4 | global.target = {}; 5 | 6 | // This ensures we only execute the script targets after the entire script has 7 | // been evaluated 8 | var args = process.argv.slice(2); 9 | setTimeout(function() { 10 | var t; 11 | 12 | if (args.length === 1 && args[0] === '--help') { 13 | console.log('Available targets:'); 14 | for (t in global.target) 15 | console.log(' ' + t); 16 | return; 17 | } 18 | 19 | // Wrap targets to prevent duplicate execution 20 | for (t in global.target) { 21 | (function(t, oldTarget){ 22 | 23 | // Wrap it 24 | global.target[t] = function(force) { 25 | if (oldTarget.done && !force) 26 | return; 27 | oldTarget.done = true; 28 | return oldTarget.apply(oldTarget, arguments); 29 | }; 30 | 31 | })(t, global.target[t]); 32 | } 33 | 34 | // Execute desired targets 35 | if (args.length > 0) { 36 | args.forEach(function(arg) { 37 | if (arg in global.target) 38 | global.target[arg](); 39 | else { 40 | console.log('no such target: ' + arg); 41 | } 42 | }); 43 | } else if ('all' in global.target) { 44 | global.target.all(); 45 | } 46 | 47 | }, 0); 48 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/scripts/generate-docs.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../global'); 3 | 4 | echo('Appending docs to README.md'); 5 | 6 | cd(__dirname + '/..'); 7 | 8 | // Extract docs from shell.js 9 | var docs = grep('//@', 'shell.js'); 10 | 11 | docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) { 12 | var file = path.match('.js$') ? path : path+'.js'; 13 | return grep('//@', file); 14 | }); 15 | 16 | // Remove '//@' 17 | docs = docs.replace(/\/\/\@ ?/g, ''); 18 | // Append docs to README 19 | sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md'); 20 | 21 | echo('All done.'); 22 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/scripts/run-tests.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../global'); 3 | 4 | var path = require('path'); 5 | 6 | var failed = false; 7 | 8 | // 9 | // Lint 10 | // 11 | JSHINT_BIN = './node_modules/jshint/bin/jshint'; 12 | cd(__dirname + '/..'); 13 | 14 | if (!test('-f', JSHINT_BIN)) { 15 | echo('JSHint not found. Run `npm install` in the root dir first.'); 16 | exit(1); 17 | } 18 | 19 | if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) { 20 | failed = true; 21 | echo('*** JSHINT FAILED! (return code != 0)'); 22 | echo(); 23 | } else { 24 | echo('All JSHint tests passed'); 25 | echo(); 26 | } 27 | 28 | // 29 | // Unit tests 30 | // 31 | cd(__dirname + '/../test'); 32 | ls('*.js').forEach(function(file) { 33 | echo('Running test:', file); 34 | if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit) 35 | failed = true; 36 | echo('*** TEST FAILED! (missing exit code "123")'); 37 | echo(); 38 | } 39 | }); 40 | 41 | if (failed) { 42 | echo(); 43 | echo('*******************************************************'); 44 | echo('WARNING: Some tests did not pass!'); 45 | echo('*******************************************************'); 46 | exit(1); 47 | } else { 48 | echo(); 49 | echo('All tests passed.'); 50 | } 51 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/cat.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | 4 | //@ 5 | //@ ### cat(file [, file ...]) 6 | //@ ### cat(file_array) 7 | //@ 8 | //@ Examples: 9 | //@ 10 | //@ ```javascript 11 | //@ var str = cat('file*.txt'); 12 | //@ var str = cat('file1', 'file2'); 13 | //@ var str = cat(['file1', 'file2']); // same as above 14 | //@ ``` 15 | //@ 16 | //@ Returns a string containing the given file, or a concatenated string 17 | //@ containing the files if more than one file is given (a new line character is 18 | //@ introduced between each file). Wildcard `*` accepted. 19 | function _cat(options, files) { 20 | var cat = ''; 21 | 22 | if (!files) 23 | common.error('no paths given'); 24 | 25 | if (typeof files === 'string') 26 | files = [].slice.call(arguments, 1); 27 | // if it's array leave it as it is 28 | 29 | files = common.expand(files); 30 | 31 | files.forEach(function(file) { 32 | if (!fs.existsSync(file)) 33 | common.error('no such file or directory: ' + file); 34 | 35 | cat += fs.readFileSync(file, 'utf8') + '\n'; 36 | }); 37 | 38 | if (cat[cat.length-1] === '\n') 39 | cat = cat.substring(0, cat.length-1); 40 | 41 | return common.ShellString(cat); 42 | } 43 | module.exports = _cat; 44 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/cd.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var common = require('./common'); 3 | 4 | //@ 5 | //@ ### cd('dir') 6 | //@ Changes to directory `dir` for the duration of the script 7 | function _cd(options, dir) { 8 | if (!dir) 9 | common.error('directory not specified'); 10 | 11 | if (!fs.existsSync(dir)) 12 | common.error('no such file or directory: ' + dir); 13 | 14 | if (!fs.statSync(dir).isDirectory()) 15 | common.error('not a directory: ' + dir); 16 | 17 | process.chdir(dir); 18 | } 19 | module.exports = _cd; 20 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/echo.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | 3 | //@ 4 | //@ ### echo(string [,string ...]) 5 | //@ 6 | //@ Examples: 7 | //@ 8 | //@ ```javascript 9 | //@ echo('hello world'); 10 | //@ var str = echo('hello world'); 11 | //@ ``` 12 | //@ 13 | //@ Prints string to stdout, and returns string with additional utility methods 14 | //@ like `.to()`. 15 | function _echo() { 16 | var messages = [].slice.call(arguments, 0); 17 | console.log.apply(this, messages); 18 | return common.ShellString(messages.join(' ')); 19 | } 20 | module.exports = _echo; 21 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/error.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | 3 | //@ 4 | //@ ### error() 5 | //@ Tests if error occurred in the last command. Returns `null` if no error occurred, 6 | //@ otherwise returns string explaining the error 7 | function error() { 8 | return common.state.error; 9 | }; 10 | module.exports = error; 11 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/find.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var common = require('./common'); 3 | var _ls = require('./ls'); 4 | 5 | //@ 6 | //@ ### find(path [,path ...]) 7 | //@ ### find(path_array) 8 | //@ Examples: 9 | //@ 10 | //@ ```javascript 11 | //@ find('src', 'lib'); 12 | //@ find(['src', 'lib']); // same as above 13 | //@ find('.').filter(function(file) { return file.match(/\.js$/); }); 14 | //@ ``` 15 | //@ 16 | //@ Returns array of all files (however deep) in the given paths. 17 | //@ 18 | //@ The main difference from `ls('-R', path)` is that the resulting file names 19 | //@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`. 20 | function _find(options, paths) { 21 | if (!paths) 22 | common.error('no path specified'); 23 | else if (typeof paths === 'object') 24 | paths = paths; // assume array 25 | else if (typeof paths === 'string') 26 | paths = [].slice.call(arguments, 1); 27 | 28 | var list = []; 29 | 30 | function pushFile(file) { 31 | if (common.platform === 'win') 32 | file = file.replace(/\\/g, '/'); 33 | list.push(file); 34 | } 35 | 36 | // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs 37 | // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory 38 | 39 | paths.forEach(function(file) { 40 | pushFile(file); 41 | 42 | if (fs.statSync(file).isDirectory()) { 43 | _ls('-RA', file+'/*').forEach(function(subfile) { 44 | pushFile(subfile); 45 | }); 46 | } 47 | }); 48 | 49 | return list; 50 | } 51 | module.exports = _find; 52 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/grep.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | 4 | //@ 5 | //@ ### grep([options ,] regex_filter, file [, file ...]) 6 | //@ ### grep([options ,] regex_filter, file_array) 7 | //@ Available options: 8 | //@ 9 | //@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria. 10 | //@ 11 | //@ Examples: 12 | //@ 13 | //@ ```javascript 14 | //@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); 15 | //@ grep('GLOBAL_VARIABLE', '*.js'); 16 | //@ ``` 17 | //@ 18 | //@ Reads input string from given files and returns a string containing all lines of the 19 | //@ file that match the given `regex_filter`. Wildcard `*` accepted. 20 | function _grep(options, regex, files) { 21 | options = common.parseOptions(options, { 22 | 'v': 'inverse' 23 | }); 24 | 25 | if (!files) 26 | common.error('no paths given'); 27 | 28 | if (typeof files === 'string') 29 | files = [].slice.call(arguments, 2); 30 | // if it's array leave it as it is 31 | 32 | files = common.expand(files); 33 | 34 | var grep = ''; 35 | files.forEach(function(file) { 36 | if (!fs.existsSync(file)) { 37 | common.error('no such file or directory: ' + file, true); 38 | return; 39 | } 40 | 41 | var contents = fs.readFileSync(file, 'utf8'), 42 | lines = contents.split(/\r*\n/); 43 | lines.forEach(function(line) { 44 | var matched = line.match(regex); 45 | if ((options.inverse && !matched) || (!options.inverse && matched)) 46 | grep += line + '\n'; 47 | }); 48 | }); 49 | 50 | return common.ShellString(grep); 51 | } 52 | module.exports = _grep; 53 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/popd.js: -------------------------------------------------------------------------------- 1 | // see dirs.js -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/pushd.js: -------------------------------------------------------------------------------- 1 | // see dirs.js -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/pwd.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var common = require('./common'); 3 | 4 | //@ 5 | //@ ### pwd() 6 | //@ Returns the current directory. 7 | function _pwd(options) { 8 | var pwd = path.resolve(process.cwd()); 9 | return common.ShellString(pwd); 10 | } 11 | module.exports = _pwd; 12 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/sed.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | 4 | //@ 5 | //@ ### sed([options ,] search_regex, replace_str, file) 6 | //@ Available options: 7 | //@ 8 | //@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ 9 | //@ 10 | //@ Examples: 11 | //@ 12 | //@ ```javascript 13 | //@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); 14 | //@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); 15 | //@ ``` 16 | //@ 17 | //@ Reads an input string from `file` and performs a JavaScript `replace()` on the input 18 | //@ using the given search regex and replacement string. Returns the new string after replacement. 19 | function _sed(options, regex, replacement, file) { 20 | options = common.parseOptions(options, { 21 | 'i': 'inplace' 22 | }); 23 | 24 | if (typeof replacement === 'string') 25 | replacement = replacement; // no-op 26 | else if (typeof replacement === 'number') 27 | replacement = replacement.toString(); // fallback 28 | else 29 | common.error('invalid replacement string'); 30 | 31 | if (!file) 32 | common.error('no file given'); 33 | 34 | if (!fs.existsSync(file)) 35 | common.error('no such file or directory: ' + file); 36 | 37 | var result = fs.readFileSync(file, 'utf8').replace(regex, replacement); 38 | if (options.inplace) 39 | fs.writeFileSync(file, result, 'utf8'); 40 | 41 | return common.ShellString(result); 42 | } 43 | module.exports = _sed; 44 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/to.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | var path = require('path'); 4 | 5 | //@ 6 | //@ ### 'string'.to(file) 7 | //@ 8 | //@ Examples: 9 | //@ 10 | //@ ```javascript 11 | //@ cat('input.txt').to('output.txt'); 12 | //@ ``` 13 | //@ 14 | //@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as 15 | //@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ 16 | function _to(options, file) { 17 | if (!file) 18 | common.error('wrong arguments'); 19 | 20 | if (!fs.existsSync( path.dirname(file) )) 21 | common.error('no such file or directory: ' + path.dirname(file)); 22 | 23 | try { 24 | fs.writeFileSync(file, this.toString(), 'utf8'); 25 | } catch(e) { 26 | common.error('could not write to file (code '+e.code+'): '+file, true); 27 | } 28 | } 29 | module.exports = _to; 30 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/node_modules/shelljs/src/toEnd.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | var path = require('path'); 4 | 5 | //@ 6 | //@ ### 'string'.toEnd(file) 7 | //@ 8 | //@ Examples: 9 | //@ 10 | //@ ```javascript 11 | //@ cat('input.txt').toEnd('output.txt'); 12 | //@ ``` 13 | //@ 14 | //@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as 15 | //@ those returned by `cat`, `grep`, etc). 16 | function _toEnd(options, file) { 17 | if (!file) 18 | common.error('wrong arguments'); 19 | 20 | if (!fs.existsSync( path.dirname(file) )) 21 | common.error('no such file or directory: ' + path.dirname(file)); 22 | 23 | try { 24 | fs.appendFileSync(file, this.toString(), 'utf8'); 25 | } catch(e) { 26 | common.error('could not append to file (code '+e.code+'): '+file, true); 27 | } 28 | } 29 | module.exports = _toEnd; 30 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var run = require('./lib/run'), 23 | reqs = require('./lib/check_reqs'), 24 | args = process.argv; 25 | 26 | // Support basic help commands 27 | if (args[2] == '--help' || args[2] == '/?' || args[2] == '-h' || 28 | args[2] == 'help' || args[2] == '-help' || args[2] == '/help') { 29 | run.help(); 30 | } else { 31 | reqs.run().done(function() { 32 | return run.run(args); 33 | }, function(err) { 34 | console.error('ERROR: ' + err); 35 | process.exit(2); 36 | }); 37 | } 38 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/run.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0run" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'run' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /sso/platforms/android/cordova/version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | // Coho updates this line: 23 | var VERSION = "3.5.0"; 24 | 25 | console.log(VERSION); 26 | -------------------------------------------------------------------------------- /sso/platforms/android/cordova/version.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0version" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'version' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /sso/platforms/android/custom_rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /sso/platforms/android/local.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must *NOT* be checked into Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | 7 | # location of the SDK. This is only used by Ant 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | sdk.dir=/Users/hpp/coding/adt-bundle-mac-x86_64-20131030/sdk 11 | -------------------------------------------------------------------------------- /sso/platforms/android/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /sso/platforms/android/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | android.library.reference.1=CordovaLib 14 | # Project target. 15 | target=android-19 16 | -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-land-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-land-hdpi/screen.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-land-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-land-ldpi/screen.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-land-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-land-mdpi/screen.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-land-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-land-xhdpi/screen.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-port-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-port-hdpi/screen.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-port-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-port-ldpi/screen.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-port-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-port-mdpi/screen.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-port-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-port-xhdpi/screen.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /sso/platforms/android/res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/android/res/drawable/icon.png -------------------------------------------------------------------------------- /sso/platforms/android/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SSO 4 | 5 | -------------------------------------------------------------------------------- /sso/platforms/android/res/xml/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | SSO 9 | 10 | A sample Apache Cordova application that responds to the deviceready event. 11 | 12 | 13 | Apache Cordova Team 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /sso/platforms/android/src/com/example/sso/SSO.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package com.example.sso; 21 | 22 | import android.os.Bundle; 23 | import org.apache.cordova.*; 24 | 25 | public class SSO extends CordovaActivity 26 | { 27 | @Override 28 | public void onCreate(Bundle savedInstanceState) 29 | { 30 | super.onCreate(savedInstanceState); 31 | super.init(); 32 | // Set by in config.xml 33 | super.loadUrl(Config.getStartUrl()); 34 | //super.loadUrl("file:///android_asset/www/index.html"); 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /sso/platforms/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.perspectivev3 3 | *.pbxuser 4 | .DS_Store 5 | build/ 6 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDV.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import "CDVAvailability.h" 21 | 22 | #import "CDVPlugin.h" 23 | #import "CDVViewController.h" 24 | #import "CDVCommandDelegate.h" 25 | #import "CDVURLProtocol.h" 26 | #import "CDVInvokedUrlCommand.h" 27 | 28 | #import "CDVDebug.h" 29 | #import "CDVPluginResult.h" 30 | #import "CDVWhitelist.h" 31 | #import "CDVLocalStorage.h" 32 | #import "CDVScreenOrientationDelegate.h" 33 | #import "CDVTimer.h" 34 | 35 | #import "NSArray+Comparisons.h" 36 | #import "NSData+Base64.h" 37 | #import "NSDictionary+Extensions.h" 38 | #import "NSMutableArray+QueueAdditions.h" 39 | #import "UIDevice+Extensions.h" 40 | 41 | #import "CDVJSON.h" 42 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import "CDVCommandDelegate.h" 22 | 23 | @class CDVViewController; 24 | @class CDVCommandQueue; 25 | 26 | @interface CDVCommandDelegateImpl : NSObject { 27 | @private 28 | __weak CDVViewController* _viewController; 29 | NSRegularExpression *_callbackIdPattern; 30 | @protected 31 | __weak CDVCommandQueue* _commandQueue; 32 | BOOL _delayResponses; 33 | } 34 | - (id)initWithViewController:(CDVViewController*)viewController; 35 | - (void)flushCommandQueueWithDelayedJs; 36 | @end 37 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVCommandQueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @class CDVInvokedUrlCommand; 23 | @class CDVViewController; 24 | 25 | @interface CDVCommandQueue : NSObject 26 | 27 | @property (nonatomic, readonly) BOOL currentlyExecuting; 28 | 29 | - (id)initWithViewController:(CDVViewController*)viewController; 30 | - (void)dispose; 31 | 32 | - (void)resetRequestId; 33 | - (void)enqueueCommandBatch:(NSString*)batchJSON; 34 | 35 | - (void)processXhrExecBridgePoke:(NSNumber*)requestId; 36 | - (void)fetchCommandsFromJs; 37 | - (void)executePending; 38 | - (BOOL)execute:(CDVInvokedUrlCommand*)command; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVConfigParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | @interface CDVConfigParser : NSObject 21 | { 22 | NSString* featureName; 23 | } 24 | 25 | @property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict; 26 | @property (nonatomic, readonly, strong) NSMutableDictionary* settings; 27 | @property (nonatomic, readonly, strong) NSMutableArray* whitelistHosts; 28 | @property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames; 29 | @property (nonatomic, readonly, strong) NSString* startPage; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #ifdef DEBUG 21 | #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) 22 | #else 23 | #define DLog(...) 24 | #endif 25 | #define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) 26 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVJSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | @interface NSArray (CDVJSONSerializing) 21 | - (NSString*)JSONString; 22 | @end 23 | 24 | @interface NSDictionary (CDVJSONSerializing) 25 | - (NSString*)JSONString; 26 | @end 27 | 28 | @interface NSString (CDVJSONSerializing) 29 | - (id)JSONObject; 30 | @end 31 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVScreenOrientationDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @protocol CDVScreenOrientationDelegate 23 | 24 | - (NSUInteger)supportedInterfaceOrientations; 25 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; 26 | - (BOOL)shouldAutorotate; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVShared.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | @interface NSError (JSONMethods) 24 | 25 | - (NSString*)JSONRepresentation; 26 | 27 | @end 28 | 29 | @interface CLLocation (JSONMethods) 30 | 31 | - (NSString*)JSONRepresentation; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVTimer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface CDVTimer : NSObject 23 | 24 | + (void)start:(NSString*)name; 25 | + (void)stop:(NSString*)name; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVURLProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import "CDVAvailability.h" 22 | 23 | @class CDVViewController; 24 | 25 | @interface CDVURLProtocol : NSURLProtocol {} 26 | 27 | + (void)registerViewController:(CDVViewController*)viewController; 28 | + (void)unregisterViewController:(CDVViewController*)viewController; 29 | @end 30 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVUserAgentUtil.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface CDVUserAgentUtil : NSObject 23 | + (NSString*)originalUserAgent; 24 | + (void)acquireLock:(void (^)(NSInteger lockToken))block; 25 | + (void)releaseLock:(NSInteger*)lockToken; 26 | + (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken; 27 | @end 28 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/CDVWhitelist.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | extern NSString* const kCDVDefaultWhitelistRejectionString; 23 | 24 | @interface CDVWhitelist : NSObject 25 | 26 | @property (nonatomic, copy) NSString* whitelistRejectionFormatString; 27 | 28 | - (id)initWithArray:(NSArray*)array; 29 | - (BOOL)schemeIsAllowed:(NSString*)scheme; 30 | - (BOOL)URLIsAllowed:(NSURL*)url; 31 | - (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure; 32 | - (NSString*)errorStringForURL:(NSURL*)url; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/NSArray+Comparisons.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface NSArray (Comparisons) 23 | 24 | - (id)objectAtIndex:(NSUInteger)index withDefault:(id)aDefault; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/NSArray+Comparisons.m: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import "NSArray+Comparisons.h" 21 | 22 | @implementation NSArray (Comparisons) 23 | 24 | - (id)objectAtIndex:(NSUInteger)index withDefault:(id)aDefault 25 | { 26 | id obj = nil; 27 | 28 | @try { 29 | obj = [self objectAtIndex:index]; 30 | if ((obj == [NSNull null]) || (obj == nil)) { 31 | return aDefault; 32 | } 33 | } 34 | @catch(NSException* exception) { 35 | NSLog(@"Exception - Name: %@ Reason: %@", [exception name], [exception reason]); 36 | } 37 | 38 | return obj; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/NSData+Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Base64.h 3 | // base64 4 | // 5 | // Created by Matt Gallagher on 2009/06/03. 6 | // Copyright 2009 Matt Gallagher. All rights reserved. 7 | // 8 | // Permission is given to use this source code file, free of charge, in any 9 | // project, commercial or otherwise, entirely at your risk, with the condition 10 | // that any redistribution (in part or whole) of source code must retain 11 | // this copyright and permission notice. Attribution in compiled projects is 12 | // appreciated but not required. 13 | // 14 | 15 | #import 16 | 17 | void *CDVNewBase64Decode( 18 | const char* inputBuffer, 19 | size_t length, 20 | size_t * outputLength); 21 | 22 | char *CDVNewBase64Encode( 23 | const void* inputBuffer, 24 | size_t length, 25 | bool separateLines, 26 | size_t * outputLength); 27 | 28 | @interface NSData (CDVBase64) 29 | 30 | + (NSData*)dataFromBase64String:(NSString*)aString; 31 | - (NSString*)base64EncodedString; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/NSDictionary+Extensions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface NSDictionary (org_apache_cordova_NSDictionary_Extension) 23 | 24 | - (bool)existsValue:(NSString*)expectedValue forKey:(NSString*)key; 25 | - (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue withRange:(NSRange)range; 26 | - (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue; 27 | - (BOOL)typeValueForKey:(NSString*)key isArray:(BOOL*)bArray isNull:(BOOL*)bNull isNumber:(BOOL*)bNumber isString:(BOOL*)bString; 28 | - (BOOL)valueForKeyIsArray:(NSString*)key; 29 | - (BOOL)valueForKeyIsNull:(NSString*)key; 30 | - (BOOL)valueForKeyIsString:(NSString*)key; 31 | - (BOOL)valueForKeyIsNumber:(NSString*)key; 32 | 33 | - (NSDictionary*)dictionaryWithLowercaseKeys; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/NSMutableArray+QueueAdditions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface NSMutableArray (QueueAdditions) 23 | 24 | - (id)pop; 25 | - (id)queueHead; 26 | - (id)dequeue; 27 | - (void)enqueue:(id)obj; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/Classes/UIDevice+Extensions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface UIDevice (org_apache_cordova_UIDevice_Extension) 23 | 24 | /* 25 | Get the unique identifier from the app bundle's folder, which is already a GUID 26 | Upgrading and/or deleting the app and re-installing will get you a new GUID, so 27 | this is only unique per install per device. 28 | */ 29 | - (NSString*)uniqueAppInstanceIdentifier; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/hpp.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CordovaLib.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D2AAC07D0554694100DB518D 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/CordovaLib_Prefix.pch: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #ifdef __OBJC__ 21 | #import 22 | #endif 23 | -------------------------------------------------------------------------------- /sso/platforms/ios/CordovaLib/VERSION: -------------------------------------------------------------------------------- 1 | 3.5.0 2 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.bundle/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/RennSDK.bundle/images/close.png -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.bundle/images/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/RennSDK.bundle/images/close@2x.png -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennAccessToken.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennAccessToken.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-17. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RennAccessToken : NSObject 12 | 13 | @property (nonatomic, copy) NSString * tokenType; 14 | @property (nonatomic, copy) NSString * accessToken; 15 | @property (nonatomic, copy) NSString * refreshToken; 16 | @property (nonatomic, copy) NSString * accessScope; 17 | @property (nonatomic, copy) NSString * macKey; 18 | @property (nonatomic, copy) NSString * macAlgorithm; 19 | @property (nonatomic, assign) NSInteger expiresIn; 20 | @property (nonatomic, assign) NSTimeInterval requestTime; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennAlbumService.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlbumService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern const NSString *kAccessControlPrivate; //仅自己可见 12 | extern const NSString *kAccessControlPublic; //所有人可见 13 | extern const NSString *kAccessControlPassword; //密码访问可见 14 | extern const NSString *kAccessControlFriend; //仅好友可见 15 | 16 | extern NSString *kRennServiceTypeGetAlbum; 17 | extern NSString *kRennServiceTypePutAlbum; 18 | extern NSString *kRennServiceTypeListAlbum; 19 | 20 | /* 21 | API链接: http://wiki.dev.renren.com/wiki/V2/album/get 22 | */ 23 | @interface GetAlbumParam : RennParam 24 | //必选 25 | @property (nonatomic, retain) NSString *albumId; 26 | //必选 27 | @property (nonatomic, retain) NSString *ownerId; 28 | 29 | @end 30 | 31 | /* 32 | API链接: http://wiki.dev.renren.com/wiki/V2/album/put 33 | */ 34 | @interface PutAlbumParam : RennParam 35 | //可选 36 | @property (nonatomic, retain) NSString *location; 37 | //可选 38 | @property (nonatomic, retain) NSString *description; 39 | //必选 40 | @property (nonatomic, retain) NSString *name; 41 | //可选 42 | @property (nonatomic, retain) NSString *accessControl; 43 | //可选 44 | @property (nonatomic, retain) NSString *password; 45 | 46 | @end 47 | 48 | /* 49 | API链接: http://wiki.dev.renren.com/wiki/V2/album/list 50 | */ 51 | @interface ListAlbumParam : RennParam 52 | //必选 53 | @property (nonatomic, retain) NSString *ownerId; 54 | //可选 55 | @property (nonatomic, assign) NSInteger pageSize; 56 | //可选 57 | @property (nonatomic, assign) NSInteger pageNumber; 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennAppService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennAppService.h 3 | // RennSDK 4 | // 5 | // Created by 杨 飞 on 13-5-13. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeGetApp; 12 | 13 | /* 14 | API链接: http://wiki.dev.renren.com/wiki/V2/app/get 15 | */ 16 | @interface GetAppParam : RennParam 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennBlogService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennBlogService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern const NSString *kTypeGetBlog; 12 | extern const NSString *kTypePutBlog; 13 | extern const NSString *kTypeListBlog; 14 | 15 | /* 16 | API链接: http://wiki.dev.renren.com/wiki/V2/blog/get 17 | */ 18 | @interface GetBlogParam : RennParam 19 | //必选 20 | @property (nonatomic, retain) NSString *blogId; 21 | //必选 22 | @property (nonatomic, retain) NSString *ownerId; 23 | //可选 24 | @property (nonatomic, retain) NSString *password; 25 | 26 | @end 27 | 28 | /* 29 | API链接: http://wiki.dev.renren.com/wiki/V2/blog/put 30 | */ 31 | @interface PutBlogParam : RennParam 32 | //必选 33 | @property (nonatomic, retain) NSString *title; 34 | //可选 35 | @property (nonatomic, retain) NSString *accessControl; 36 | //可选 37 | @property (nonatomic, retain) NSString *password; 38 | //必选 39 | @property (nonatomic, retain) NSString *content; 40 | 41 | @end 42 | 43 | /* 44 | API链接: http://wiki.dev.renren.com/wiki/V2/blog/list 45 | */ 46 | @interface ListBlogParam : RennParam 47 | //必选 48 | @property (nonatomic, retain) NSString *ownerId; 49 | //可选 50 | @property (nonatomic, assign) NSInteger pageSize; 51 | //必选 52 | @property (nonatomic, assign) NSInteger pageNumber; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennCommentService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennCommentService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-17. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kCommentTypeBlog; 12 | extern NSString *kCommentTypeStatus; 13 | extern NSString *kCommentTypePhoto; 14 | extern NSString *kCommentTypeShare; 15 | extern NSString *kCommentTypeAlbum; 16 | 17 | extern NSString *kRennServiceTypePutComment; 18 | extern NSString *kRennServiceTypeListComment; 19 | 20 | /* 21 | API链接: http://wiki.dev.renren.com/wiki/V2/comment/put 22 | */ 23 | @interface PutCommentParam : RennParam 24 | //必选 25 | @property (nonatomic, retain) NSString *entryOwnerId; 26 | //必选 27 | @property (nonatomic, retain) NSString *entryId; 28 | //必选 29 | @property (nonatomic, retain) NSString *commentType; 30 | //可选 31 | @property (nonatomic, retain) NSString *targetUserId; 32 | //必选 33 | @property (nonatomic, retain) NSString *content; 34 | 35 | @end 36 | 37 | /* 38 | API链接: http://wiki.dev.renren.com/wiki/V2/comment/list 39 | */ 40 | @interface ListCommentParam : RennParam 41 | //必选 42 | @property (nonatomic, retain) NSString *entryOwnerId; 43 | //必选 44 | @property (nonatomic, retain) NSString *entryId; 45 | //必选 46 | @property (nonatomic, retain) NSString *commentType; 47 | //可选 48 | @property (nonatomic, assign) NSInteger pageSize; 49 | //可选 50 | @property (nonatomic, assign) NSInteger pageNumber; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennFeedService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennFeedService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypePutFeed; 12 | extern NSString *kRennServiceTypeListFeed; 13 | 14 | /* 15 | API链接: http://wiki.dev.renren.com/wiki/V2/feed/put 16 | */ 17 | @interface PutFeedParam : RennParam 18 | //必选 19 | @property (nonatomic, retain) NSString *message; 20 | //必选 21 | @property (nonatomic, retain) NSString *title; 22 | //可选 23 | @property (nonatomic, retain) NSString *actionTargetUrl; 24 | //可选 25 | @property (nonatomic, retain) NSString *imageUrl; 26 | //必选 27 | @property (nonatomic, retain) NSString *description; 28 | //可选 29 | @property (nonatomic, retain) NSString *subtitle; 30 | //可选 31 | @property (nonatomic, retain) NSString *actionName; 32 | //必选 33 | @property (nonatomic, retain) NSString *targetUrl; 34 | 35 | @end 36 | 37 | 38 | /* 39 | API链接: http://wiki.dev.renren.com/wiki/V2/feed/list 40 | */ 41 | @interface ListFeedParam : RennParam 42 | //可选 43 | @property (nonatomic, retain) NSString *feedType; 44 | //可选 45 | @property (nonatomic, retain) NSString *userId; 46 | //可选 47 | @property (nonatomic, assign) NSInteger pageSize; 48 | //可选 49 | @property (nonatomic, assign) NSInteger pageNumber; 50 | 51 | @end 52 | 53 | 54 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennFriendService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennFriendService.h 3 | // RennSDK 4 | // 5 | // Created by 杨 飞 on 13-5-13. 6 | // Copyright (c) 2013年 YangFei. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeListFriend; 12 | 13 | 14 | 15 | /* 16 | API链接: http://wiki.dev.renren.com/wiki/V2/friend/list 17 | */ 18 | @interface ListFriendParam : RennParam 19 | 20 | //可选 21 | @property (nonatomic, retain) NSString *userId; 22 | 23 | //可选 24 | @property (nonatomic, assign) NSInteger pageSize; 25 | 26 | //可选 27 | @property (nonatomic, assign) NSInteger pageNumber; 28 | 29 | @end 30 | 31 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennHttpRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennHttpRequest.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-8. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define API_SERVER @"api.renren.com" 12 | #define API_PORT @"80" 13 | 14 | @class RennHttpRequest; 15 | 16 | @protocol RennHttpRequestDelegate 17 | 18 | - (void)request:(RennHttpRequest *)request responseWithData:(NSData *)data; 19 | 20 | - (void)request:(RennHttpRequest *)request failWithError:(NSError *)error; 21 | 22 | @end 23 | 24 | @interface RennHttpRequest : NSObject 25 | 26 | @property (retain, nonatomic) id delegate; 27 | 28 | @property (assign, nonatomic) NSTimeInterval timeoutInterval; 29 | 30 | @property (retain, nonatomic) NSString *httpMethod; 31 | @property (retain, nonatomic) NSURL *URL; 32 | @property (retain, nonatomic) NSDictionary *param; 33 | @property (retain, nonatomic) NSDictionary *data; 34 | @property (retain, nonatomic) NSString *ua; 35 | 36 | - (id)initWithURL:(NSURL *)newURL param:(NSDictionary *)param; 37 | 38 | - (id)initWithPath:(NSString *)path param:(NSDictionary *)param; 39 | 40 | - (void)startAsynchronous; 41 | 42 | - (void)clearDelegateAndCancel; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennLoginService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennLoginService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * @description 第三方应用需实现此协议,登录时传入此类对象,用于完成登录结果的回调 13 | */ 14 | @protocol RennLoginDelegate 15 | 16 | @optional 17 | 18 | - (void)rennLoginSuccess; 19 | - (void)rennLogoutSuccess; 20 | - (void)rennLoginCancelded; 21 | - (void)rennLoginDidFailWithError:(NSError *)error; 22 | - (void)rennLoginAccessTokenInvalidOrExpired:(NSError *)error; 23 | 24 | @end 25 | 26 | @interface RennLoginService : NSObject 27 | 28 | @property (nonatomic, assign) id delegate; 29 | 30 | @property (nonatomic, retain) NSString *appId; 31 | @property (nonatomic, retain) NSString *apiKey; 32 | @property (nonatomic, retain) NSString *scope; 33 | @property (nonatomic, retain) NSString *secretKey; 34 | @property (nonatomic, retain) NSString *tokenType; 35 | 36 | @property (nonatomic, assign) BOOL enableSSO; 37 | 38 | + (RennLoginService *)sharedRennLoginService; 39 | 40 | - (void)login; 41 | 42 | - (void)logout; 43 | 44 | - (BOOL)handleOpenURL:(NSURL *)url; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennNotificationService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennNotificationService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypePutNotificationAsUser; 12 | extern NSString *kRennServiceTypePutNotificationAsApp; 13 | 14 | /* 15 | API链接: http://wiki.dev.renren.com/wiki/V2/notification/user/put 16 | */ 17 | @interface PutNotificationAsUserParam : RennParam 18 | //必选 19 | @property (nonatomic, retain) NSString *content; 20 | //必选 21 | @property (nonatomic, retain) NSArray *userIds; 22 | 23 | @end 24 | 25 | /* 26 | API链接: http://wiki.dev.renren.com/wiki/V2/notification/app/put 27 | */ 28 | @interface PutNotificationAsAppParam : RennParam 29 | //必选 30 | @property (nonatomic, retain) NSString *content; 31 | //必选 32 | @property (nonatomic, retain) NSArray *userIds; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennParam.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennParam.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-17. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RennParam : NSObject 12 | { 13 | NSString *_type; 14 | NSString *_path; 15 | NSString *_method; 16 | } 17 | 18 | - (id)initWithType:(NSString *)type path:(NSString *)path method:(NSString *)method; 19 | 20 | - (NSString *)type; 21 | 22 | - (NSString *)path; 23 | 24 | - (NSString *)method; 25 | 26 | - (NSDictionary *)toDictionary; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennPhotoService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennPhotoService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeGetPhoto; 12 | extern NSString *kRennServiceTypeUploadPhoto; 13 | extern NSString *kRennServiceTypeListPhoto; 14 | 15 | /* 16 | API链接: http://wiki.dev.renren.com/wiki/V2/photo/get 17 | */ 18 | @interface GetPhotoParam : RennParam 19 | //可选 20 | @property (nonatomic, retain) NSString *albumId; 21 | //必选 22 | @property (nonatomic, retain) NSString *photoId; 23 | //必选 24 | @property (nonatomic, retain) NSString *ownerId; 25 | //可选 26 | @property (nonatomic, retain) NSString *password; 27 | 28 | @end 29 | 30 | /* 31 | API链接: http://wiki.dev.renren.com/wiki/V2/photo/upload 32 | */ 33 | @interface UploadPhotoParam : RennParam 34 | //必选 35 | @property (nonatomic, retain) NSString *albumId; 36 | //可选 37 | @property (nonatomic, retain) NSString *description; 38 | //可选 39 | @property (nonatomic, retain) NSData *file; 40 | 41 | @end 42 | 43 | /* 44 | API链接: http://wiki.dev.renren.com/wiki/V2/photo/list 45 | */ 46 | @interface ListPhotoParam : RennParam 47 | //必选 48 | @property (nonatomic, retain) NSString *albumId; 49 | //必选 50 | @property (nonatomic, retain) NSString *ownerId; 51 | //可选 52 | @property (nonatomic, retain) NSString *password; 53 | //可选 54 | @property (nonatomic, assign) NSInteger pageSize; 55 | //可选 56 | @property (nonatomic, assign) NSInteger pageNumber; 57 | 58 | @end 59 | 60 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennProfileService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennProfileService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeGetProfile; 12 | 13 | /* 14 | API链接: http://wiki.dev.renren.com/wiki/V2/profile/get 15 | */ 16 | @interface GetProfileParam : RennParam 17 | //必选 18 | @property (nonatomic, retain) NSString *userId; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennSDK.h: -------------------------------------------------------------------------------- 1 | 2 | #import "RennClient.h" 3 | #import "RennAppService.h" 4 | #import "RennLikeService.h" 5 | #import "RennBlogService.h" 6 | #import "RennAlbumService.h" 7 | #import "RennCommentService.h" 8 | #import "RennFeedService.h" 9 | #import "RennNotificationService.h" 10 | #import "RennPhotoService.h" 11 | #import "RennProfileService.h" 12 | #import "RennShareService.h" 13 | #import "RennStatusService.h" 14 | #import "RennUbbService.h" 15 | #import "RennUserService.h" 16 | #import "RennFriendService.h" 17 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-8. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RennHttpRequest.h" 11 | #import "RennParam.h" 12 | 13 | @class RennService; 14 | 15 | @protocol RennServiveDelegate 16 | 17 | @optional 18 | 19 | - (void)rennService:(RennService *)service requestSuccessWithResponse:(id)response; 20 | 21 | - (void)rennService:(RennService *)service requestFailWithError:(NSError*)error; 22 | 23 | @end 24 | 25 | @interface RennService : NSObject 26 | 27 | @property (nonatomic, retain) RennHttpRequest *request; 28 | @property (nonatomic, retain) NSString *type; 29 | @property (nonatomic, readonly) id delegate; 30 | 31 | - (id)initWithDelegate:(id)delegate; 32 | 33 | - (void)clearDelegateAndCancel; 34 | 35 | - (void)sendAsynRequest:(RennParam *)param; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennStatusService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennStatusService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeGetStatus; 12 | extern NSString *kRennServiceTypePutStatus; 13 | extern NSString *kRennServiceTypeListStatus; 14 | extern NSString *kRennServiceTypeShareStatus; 15 | 16 | /* 17 | API链接: http://wiki.dev.renren.com/wiki/V2/status/get 18 | */ 19 | @interface GetStatusParam : RennParam 20 | //必选 21 | @property (nonatomic, retain) NSString *statusId; 22 | //必选 23 | @property (nonatomic, retain) NSString *ownerId; 24 | 25 | @end 26 | 27 | /* 28 | API链接: http://wiki.dev.renren.com/wiki/V2/status/put 29 | */ 30 | @interface PutStatusParam : RennParam 31 | //必选 32 | @property (nonatomic, retain) NSString *content; 33 | 34 | @end 35 | 36 | /* 37 | API链接: http://wiki.dev.renren.com/wiki/V2/status/list 38 | */ 39 | @interface ListStatusParam : RennParam 40 | //必选 41 | @property (nonatomic, retain) NSString *ownerId; 42 | //可选 43 | @property (nonatomic, assign) NSInteger pageSize; 44 | //可选 45 | @property (nonatomic, assign) NSInteger pageNumber; 46 | 47 | @end 48 | 49 | /* 50 | API链接: http://wiki.dev.renren.com/wiki/V2/status/share 51 | */ 52 | @interface ShareStatusParam : RennParam 53 | //必选 54 | @property (nonatomic, retain) NSString *content; 55 | //必选 56 | @property (nonatomic, retain) NSString *statusId; 57 | //必选 58 | @property (nonatomic, retain) NSString *ownerId; 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/Headers/RennUbbService.h: -------------------------------------------------------------------------------- 1 | // 2 | // RennUbbService.h 3 | // RennSDK 4 | // 5 | // Created by Li Chengliang on 13-4-10. 6 | // Copyright (c) 2013年 Li Chengliang. All rights reserved. 7 | // 8 | 9 | #import "RennParam.h" 10 | 11 | extern NSString *kRennServiceTypeListUbb; 12 | 13 | /* 14 | API链接: http://wiki.dev.renren.com/wiki/V2/ubb/list 15 | */ 16 | @interface ListUbbParam : RennParam 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /sso/platforms/ios/RennSDK.framework/RennSDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/RennSDK.framework/RennSDK -------------------------------------------------------------------------------- /sso/platforms/ios/SSO.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO.xcodeproj/project.xcworkspace/xcuserdata/hpp.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO.xcodeproj/project.xcworkspace/xcuserdata/hpp.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /sso/platforms/ios/SSO.xcodeproj/xcuserdata/hpp.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SSO.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 1D6058900D05DD3D006BFB54 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.perspectivev3 3 | *.pbxuser 4 | .DS_Store 5 | build/ 6 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Classes/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | // 21 | // AppDelegate.h 22 | // SSO 23 | // 24 | // Created by ___FULLUSERNAME___ on ___DATE___. 25 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. 26 | // 27 | 28 | #import 29 | 30 | #import 31 | 32 | @interface AppDelegate : NSObject {} 33 | 34 | // invoke string is passed to your app on launch, this is only valid if you 35 | // edit SSO-Info.plist to add a protocol 36 | // a simple tutorial can be found here : 37 | // http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html 38 | 39 | @property (nonatomic, strong) IBOutlet UIWindow* window; 40 | @property (nonatomic, strong) IBOutlet CDVViewController* viewController; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Classes/MainViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | // 21 | // MainViewController.h 22 | // SSO 23 | // 24 | // Created by ___FULLUSERNAME___ on ___DATE___. 25 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. 26 | // 27 | 28 | #import 29 | #import 30 | #import 31 | 32 | @interface MainViewController : CDVViewController 33 | 34 | @end 35 | 36 | @interface MainCommandDelegate : CDVCommandDelegateImpl 37 | @end 38 | 39 | @interface MainCommandQueue : CDVCommandQueue 40 | @end 41 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Plugins/QQLogin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | #import 23 | 24 | @interface QQLogin : CDVPlugin 25 | { 26 | TencentOAuth* _tencentOAuth; 27 | NSMutableArray* _permissions; 28 | 29 | } 30 | 31 | 32 | - (void)ssoLogin:(CDVInvokedUrlCommand*)command; 33 | - (void)share:(CDVInvokedUrlCommand*)command; 34 | - (void)isInstalled:(CDVInvokedUrlCommand*)command; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Plugins/README: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder. 21 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Plugins/RenrenLogin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | @interface RenrenLogin : CDVPlugin 24 | {} 25 | 26 | 27 | - (void)ssoLogin:(CDVInvokedUrlCommand*)command; 28 | - (void)ssoLogout:(CDVInvokedUrlCommand*)command; 29 | - (void)share:(CDVInvokedUrlCommand*)command; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Plugins/WeiboLogin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | @interface WeiboLogin : CDVPlugin 24 | {} 25 | 26 | 27 | - (void)ssoLogin:(CDVInvokedUrlCommand*)command; 28 | - (void)share:(CDVInvokedUrlCommand*)command; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/de.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | 21 | // controller title for Videos 22 | "Videos title" = "Videos"; 23 | // accessibility label for recording button 24 | "toggle audio recording" = "starten/beenden der Tonaufnahme"; 25 | // notification spoken by VoiceOver when timed recording finishes 26 | "timed recording complete" = "programmierte Aufnahme beendet"; 27 | // accessibility hint for display of recorded elapsed time 28 | "recorded time in minutes and seconds" = "aufgenommene Zeit in Minuten und Sekunden"; 29 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | // controller title for Videos 21 | "Videos title" = "Videos"; 22 | // accessibility label for recording button 23 | "toggle audio recording" = "toggle audio recording"; 24 | // notification spoken by VoiceOver when timed recording finishes 25 | "timed recording complete" = "timed recording complete"; 26 | // accessibility hint for display of recorded elapsed time 27 | "recorded time in minutes and seconds" = "recorded time in minutes and seconds"; 28 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/es.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | // controller title for Videos 21 | "Videos title" = "Videos"; 22 | // accessibility label for recording button 23 | "toggle audio recording" = "grabación de audio cambiar"; 24 | // notification spoken by VoiceOver when timed recording finishes 25 | "timed recording complete" = "tiempo de grabación completo"; 26 | // accessibility hint for display of recorded elapsed time 27 | "recorded time in minutes and seconds" = "tiempo registrado en minutos y segundos"; 28 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-40.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-40@2x.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-50.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-50@2x.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-60.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-60@2x.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-72.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-72@2x.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-76.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-76@2x.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-small.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon-small@2x.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/icons/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/icons/icon@2x.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/se.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | 21 | // controller title for Videos 22 | "Videos title" = "Videor"; 23 | // accessibility label for recording button 24 | "toggle audio recording" = "börja/avsluta inspelning"; 25 | // notification spoken by VoiceOver when timed recording finishes 26 | "timed recording complete" = "inspelning har avslutad"; 27 | // accessibility hint for display of recorded elapsed time 28 | "recorded time in minutes and seconds" = "inspelad tid in minuter och sekund"; 29 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/splash/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/splash/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/splash/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/splash/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/splash/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/splash/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/splash/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/splash/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/splash/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/splash/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/splash/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/splash/Default@2x~iphone.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/Resources/splash/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/SSO/Resources/splash/Default~iphone.png -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/SSO-Prefix.pch: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | // 20 | // Prefix header for all source files of the 'SSO' target in the 'SSO' project 21 | // 22 | 23 | #ifdef __OBJC__ 24 | #import 25 | #import 26 | #endif 27 | -------------------------------------------------------------------------------- /sso/platforms/ios/SSO/main.m: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | // 20 | // main.m 21 | // SSO 22 | // 23 | // Created by ___FULLUSERNAME___ on ___DATE___. 24 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. 25 | // 26 | 27 | #import 28 | 29 | int main(int argc, char* argv[]) 30 | { 31 | @autoreleasepool { 32 | int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); 33 | return retVal; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /sso/platforms/ios/TencentOpenAPI.framework/TencentOpenAPI: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/TencentOpenAPI.framework/TencentOpenAPI -------------------------------------------------------------------------------- /sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/Info.plist -------------------------------------------------------------------------------- /sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/error.png -------------------------------------------------------------------------------- /sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/js.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/js.zip -------------------------------------------------------------------------------- /sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/public_key.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/public_key.der -------------------------------------------------------------------------------- /sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/qqicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/qqicon.png -------------------------------------------------------------------------------- /sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/TencentOpenApi_IOS_Bundle.bundle/success.png -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/apple_ios_version: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | # outputs the highest level of iOS sdk installed 23 | iOS_X_VERSIONS=$(xcodebuild -showsdks | sed -e '/./{H;$!d;}' -e 'x;/iOS SDKs/!d;' | grep -o '[0-9]*\.[0-9]* '); 24 | echo $iOS_X_VERSIONS | tr " " "\n" | sort -g | tail -1; -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/apple_osx_version: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | # outputs the highest level of OS X sdk installed 23 | OS_X_VERSIONS=$(xcodebuild -showsdks | sed -e '/./{H;$!d;}' -e 'x;/OS X SDKs/!d;' | grep -o '[0-9]*\.[0-9]* '); 24 | echo $OS_X_VERSIONS | tr " " "\n" | sort -g | tail -1; -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/apple_xcode_version: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | # outputs which version of XCODE is installed 23 | XCODEBUILD_VERSION=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //') 24 | echo $XCODEBUILD_VERSION -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/build.xcconfig: -------------------------------------------------------------------------------- 1 | // to list all installed iOS identities, run: 2 | // security find-identity | sed -n 's/.*\("[^"]*"\).*/\1/p' | grep 'iPhone' 3 | 4 | // generic 'iPhone Developer' (no quotes) will match the right Identity with the right Provisioning Profile plus Certificate, based on the app bundle id 5 | CODE_SIGN_IDENTITY = iPhone Developer -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/check_reqs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | XCODEBUILD_LOCATION=$(which xcodebuild) 23 | if [ $? != 0 ]; then 24 | echo "Xcode is (probably) not installed, specifically the command 'xcodebuild' is unavailable." 25 | exit 2 26 | fi 27 | 28 | XCODEBUILD_MIN_VERSION="4.6" 29 | XCODEBUILD_VERSION=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //') 30 | 31 | if [[ "$XCODEBUILD_VERSION" < "$XCODEBUILD_MIN_VERSION" ]]; then 32 | echo "Cordova can only run in Xcode version $XCODEBUILD_MIN_VERSION or greater." 33 | exit 2 34 | fi 35 | -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/clean: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | # 23 | # Clean a Cordova/iOS project 24 | # 25 | 26 | set -e 27 | 28 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P) 29 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")" 30 | XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj ) 31 | PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj) 32 | 33 | source "$CORDOVA_PATH/check_reqs" 34 | 35 | cd "$PROJECT_PATH" 36 | 37 | xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Debug -alltargets clean 38 | xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Release -alltargets clean 39 | 40 | rm -rf "build" -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/lib/list-devices: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | 21 | system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2 " iPad"}' 22 | system_profiler SPUSBDataType | sed -n -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2 " iPhone"}' 23 | -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/lib/list-emulator-images: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # Valid values for "--target" (case insensitive): 21 | # "iPhone Retina (3.5-inch)" (default) 22 | # "iPhone Retina (4-inch)" 23 | # "iPhone" 24 | # "iPad" 25 | # "iPad Retina" 26 | 27 | set -e 28 | 29 | echo \""iPhone (Retina 3.5-inch)"\" 30 | echo \""iPhone (Retina 4-inch)"\" 31 | 32 | # this assumes Xcode 5 minimum not supported by ios-sim yet 33 | # echo \""iPhone (Retina 4-inch 64-bit)"\" 34 | 35 | echo \""iPhone"\" 36 | echo \""iPad"\" 37 | echo \""iPad (Retina)"\" 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/lib/list-started-emulators: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # Valid values for "--target" (case insensitive): 21 | # "iPhone (Retina 3.5-inch)" (default) 22 | # "iPhone (Retina 4-inch)" 23 | # "iPhone" 24 | # "iPad" 25 | # "iPad (Retina)" 26 | 27 | set -e 28 | 29 | SIM_RUNNING=$(ps aux | grep -i "[i]Phone Simulator" | wc -l) 30 | if [ $SIM_RUNNING == 0 ]; then 31 | echo "No emulators are running." 32 | exit 1 33 | fi 34 | 35 | SIM_ID=`defaults read com.apple.iphonesimulator "SimulateDevice"` 36 | echo \"$SIM_ID\" 37 | -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/lib/sim.applescript: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | tell application "System Events" 19 | set UI elements enabled to true 20 | end tell 21 | 22 | tell application "iPhone Simulator" 23 | activate 24 | end tell 25 | 26 | tell application "System Events" 27 | tell process "iPhone Simulator" 28 | click menu item "$DEVICE_NAME" of menu 1 of menu item "Device" of menu 1 of menu bar item "Hardware" of menu bar 1 29 | click menu item "Home" of menu 1 of menu bar item "Hardware" of menu bar 1 30 | end tell 31 | end tell 32 | -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/lib/start-emulator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # Valid values for "--target" (case insensitive): 21 | # "iPhone (Retina 3.5-inch)" (default) 22 | # "iPhone (Retina 4-inch)" 23 | # "iPhone" 24 | # "iPad" 25 | # "iPad (Retina)" 26 | 27 | set -e 28 | 29 | 30 | DEFAULT_TARGET="iPhone Retina (3.5-inch)" 31 | TARGET=${1:-$DEFAULT_TARGET} 32 | LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P) 33 | 34 | SCPT=`sed -e "s/\\$DEVICE_NAME/$TARGET/g" "$LIB_PATH/sim.applescript"` 35 | osascript -e "$SCPT" 36 | -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/log: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | 21 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P) 22 | 23 | tail -f "$CORDOVA_PATH/console.log" 24 | -------------------------------------------------------------------------------- /sso/platforms/ios/cordova/version: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | # 23 | # Returns the VERSION of CordovaLib used. 24 | # Note: it does not work if the --shared option was used to create the project. 25 | # 26 | 27 | set -e 28 | 29 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P) 30 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")" 31 | 32 | VERSION_FILE_PATH="$PROJECT_PATH/CordovaLib/VERSION" 33 | VERSION=$(<"$VERSION_FILE_PATH") 34 | 35 | if [ -f "$VERSION_FILE_PATH" ]; then 36 | echo $VERSION 37 | else 38 | echo "The file \"$VERSION_FILE_PATH\" does not exist." 39 | exit 1 40 | fi -------------------------------------------------------------------------------- /sso/platforms/ios/libWeiboSDK/WeiboSDK.bundle/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/libWeiboSDK/WeiboSDK.bundle/images/close.png -------------------------------------------------------------------------------- /sso/platforms/ios/libWeiboSDK/WeiboSDK.bundle/images/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/libWeiboSDK/WeiboSDK.bundle/images/close@2x.png -------------------------------------------------------------------------------- /sso/platforms/ios/libWeiboSDK/libWeiboSDK.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/libWeiboSDK/libWeiboSDK.a -------------------------------------------------------------------------------- /sso/platforms/ios/www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = [ 3 | 4 | { 5 | "file": "plugins/com.example.cordova.weiboLogin/www/weiboLogin.js", 6 | "id": "com.example.cordova.weiboLogin", 7 | "clobbers": [ 8 | "weiboLogin" 9 | ] 10 | }, { 11 | "file": "plugins/com.example.cordova.renrenLogin/www/renrenLogin.js", 12 | "id": "com.example.cordova.renrenLogin", 13 | "clobbers": [ 14 | "renrenLogin" 15 | ] 16 | }, { 17 | "file": "plugins/com.example.cordova.qqLogin/www/qqLogin.js", 18 | "id": "com.example.cordova.qqLogin", 19 | "clobbers": [ 20 | "qqLogin" 21 | ] 22 | } 23 | 24 | 25 | ]; 26 | module.exports.metadata = 27 | // TOP OF METADATA 28 | {} 29 | // BOTTOM OF METADATA 30 | }); -------------------------------------------------------------------------------- /sso/platforms/ios/www/css/index.css: -------------------------------------------------------------------------------- 1 | 2 | * { 3 | -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */ 4 | } 5 | 6 | body { 7 | -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ 8 | -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ 9 | -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ 10 | background-color:#fff; 11 | 12 | font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif; 13 | font-size:12px; 14 | height:100%; 15 | margin:0px; 16 | padding:0px; 17 | text-transform:uppercase; 18 | width:100%; 19 | } 20 | 21 | 22 | h1{ 23 | padding: 20px; 24 | text-align: center; 25 | } 26 | 27 | .login-wrap .btn{ 28 | height: 40px; 29 | line-height: 40px; 30 | border: 1px solid #ccc; 31 | border-radius: 5px; 32 | text-align: center; 33 | margin: 10px; 34 | font-size: 16px; 35 | } -------------------------------------------------------------------------------- /sso/platforms/ios/www/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/platforms/ios/www/img/logo.png -------------------------------------------------------------------------------- /sso/platforms/ios/www/js/index.js: -------------------------------------------------------------------------------- 1 | var app = { 2 | // Application Constructor 3 | initialize: function() { 4 | this.bindEvents(); 5 | }, 6 | bindEvents: function() { 7 | document.getElementById('qq-login').addEventListener('click',function(){ 8 | qqLogin.ssoLogin(function(res){ 9 | alert('uid:'+res.uid+' token:'+res.token); 10 | },function(){ 11 | alert('error'); 12 | }); 13 | 14 | },false); 15 | 16 | document.getElementById('weibo-login').addEventListener('click',function(){ 17 | weiboLogin.ssoLogin(function(res){ 18 | alert('uid:'+res.uid+' token:'+res.token); 19 | },function(){ 20 | alert('error'); 21 | }); 22 | 23 | },false); 24 | document.getElementById('renren-login').addEventListener('click',function(){ 25 | renrenLogin.ssoLogin(function(res){ 26 | alert('uid:'+res.uid+' token:'+res.token); 27 | },function(){ 28 | alert('error'); 29 | }); 30 | 31 | },false); 32 | 33 | 34 | } 35 | 36 | 37 | }; 38 | document.addEventListener('deviceready', function(){ 39 | 40 | app.initialize(); 41 | 42 | }, false); 43 | -------------------------------------------------------------------------------- /sso/platforms/ios/www/plugins/com.example.cordova.qqLogin/www/qqLogin.js: -------------------------------------------------------------------------------- 1 | cordova.define("com.example.cordova.qqLogin", function(require, exports, module) { 2 | /* 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | * 21 | */ 22 | var exec = require('cordova/exec'); 23 | 24 | module.exports = { 25 | ssoLogin: function(onSuccess,onFail) { 26 | exec(function(res){ 27 | onSuccess(res); 28 | },onFail, "QQLogin", "ssoLogin", []); 29 | }, 30 | isInstalled: function(onSuccess,onFail) { 31 | exec(function(){ 32 | onSuccess(); 33 | },onFail, "QQLogin", "isInstalled", []); 34 | }, 35 | 36 | ssoLogout: function(onSuccess,onFail) { 37 | exec(function(res){ 38 | onSuccess(res); 39 | },onFail, "QQLogin", "ssoLogout", []); 40 | } 41 | } 42 | }); 43 | 44 | 45 | -------------------------------------------------------------------------------- /sso/platforms/ios/www/plugins/com.example.cordova.renrenLogin/www/renrenLogin.js: -------------------------------------------------------------------------------- 1 | cordova.define("com.example.cordova.renrenLogin", function(require, exports, module) { 2 | /* 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | * 21 | */ 22 | var exec = require('cordova/exec'); 23 | 24 | module.exports = { 25 | ssoLogin: function(onSuccess,onFail) { 26 | exec(function(res){ 27 | onSuccess(res); 28 | },onFail, "RenrenLogin", "ssoLogin", []); 29 | }, 30 | ssoLogout: function(onSuccess,onFail) { 31 | exec(function(res){ 32 | onSuccess(res); 33 | },onFail, "RenrenLogin", "ssoLogout", []); 34 | } 35 | } 36 | }); 37 | 38 | 39 | -------------------------------------------------------------------------------- /sso/platforms/ios/www/plugins/com.example.cordova.weiboLogin/www/weiboLogin.js: -------------------------------------------------------------------------------- 1 | cordova.define("com.example.cordova.weiboLogin", function(require, exports, module) { 2 | /* 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | * 21 | */ 22 | var exec = require('cordova/exec'); 23 | 24 | module.exports = { 25 | ssoLogin: function(onSuccess,onFail) { 26 | exec(function(res){ 27 | onSuccess(res); 28 | },onFail, "WeiboLogin", "ssoLogin", []); 29 | } 30 | } 31 | }); 32 | 33 | 34 | -------------------------------------------------------------------------------- /sso/plugins/android.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": {}, 7 | "installed_plugins": {}, 8 | "dependent_plugins": {} 9 | } -------------------------------------------------------------------------------- /sso/plugins/ios.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": {}, 7 | "installed_plugins": {}, 8 | "dependent_plugins": {} 9 | } -------------------------------------------------------------------------------- /sso/www/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/sso/www/img/logo.png -------------------------------------------------------------------------------- /weibo/android/weibosdkcore.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/weibo/android/weibosdkcore.jar -------------------------------------------------------------------------------- /weibo/docs/微博Android平台SDK文档V2.4.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/weibo/docs/微博Android平台SDK文档V2.4.0.pdf -------------------------------------------------------------------------------- /weibo/docs/微博IOS平台SDK文档V2.4.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/weibo/docs/微博IOS平台SDK文档V2.4.0.pdf -------------------------------------------------------------------------------- /weibo/ios/WeiboLogin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | @interface WeiboLogin : CDVPlugin 24 | {} 25 | 26 | 27 | - (void)ssoLogin:(CDVInvokedUrlCommand*)command; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /weibo/ios/libWeiboSDK/WeiboSDK.bundle/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/weibo/ios/libWeiboSDK/WeiboSDK.bundle/images/close.png -------------------------------------------------------------------------------- /weibo/ios/libWeiboSDK/WeiboSDK.bundle/images/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/weibo/ios/libWeiboSDK/WeiboSDK.bundle/images/close@2x.png -------------------------------------------------------------------------------- /weibo/ios/libWeiboSDK/libWeiboSDK.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessiehan/phonegap-social-sso/f7c8fbf6dadf9c01e024b3e57e3007c53e236c2d/weibo/ios/libWeiboSDK/libWeiboSDK.a -------------------------------------------------------------------------------- /weibo/www/plugins/weiboLogin.js: -------------------------------------------------------------------------------- 1 | cordova.define("com.example.cordova.weiboLogin", function(require, exports, module) { 2 | /* 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | * 21 | */ 22 | var exec = require('cordova/exec'); 23 | 24 | module.exports = { 25 | ssoLogin: function(onSuccess,onFail) { 26 | exec(function(res){ 27 | onSuccess(res); 28 | },onFail, "WeiboLogin", "ssoLogin", []); 29 | } 30 | } 31 | }); 32 | 33 | 34 | --------------------------------------------------------------------------------