diff --git a/Simplicity.xcodeproj/project.pbxproj b/Simplicity.xcodeproj/project.pbxproj index 93e3b6e..60846f8 100644 --- a/Simplicity.xcodeproj/project.pbxproj +++ b/Simplicity.xcodeproj/project.pbxproj @@ -15,7 +15,6 @@ DF74EC471CE2AC6F008F16BF /* Simplicity.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF74EC461CE2AC6F008F16BF /* Simplicity.swift */; }; DF74EC4A1CE2ACF0008F16BF /* Facebook.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF74EC491CE2ACF0008F16BF /* Facebook.swift */; }; DF74EC4C1CE2AD19008F16BF /* Simplicity.podspec in Resources */ = {isa = PBXBuildFile; fileRef = DF74EC4B1CE2AD19008F16BF /* Simplicity.podspec */; }; - DF8674F91D1A0351005C636A /* Instagram.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF8674F81D1A0351005C636A /* Instagram.swift */; }; DFB3897F1CEBAA57001DDCCE /* LoginError.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB3897E1CEBAA57001DDCCE /* LoginError.swift */; }; DFB389811CEBAA98001DDCCE /* OAuth2Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB389801CEBAA98001DDCCE /* OAuth2Error.swift */; }; DFB389861CECFBFC001DDCCE /* Google.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB389851CECFBFC001DDCCE /* Google.swift */; }; @@ -35,7 +34,6 @@ DF74EC461CE2AC6F008F16BF /* Simplicity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Simplicity.swift; sourceTree = ""; }; DF74EC491CE2ACF0008F16BF /* Facebook.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Facebook.swift; path = LoginProviders/Facebook.swift; sourceTree = ""; }; DF74EC4B1CE2AD19008F16BF /* Simplicity.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Simplicity.podspec; sourceTree = ""; }; - DF8674F81D1A0351005C636A /* Instagram.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Instagram.swift; path = LoginProviders/Instagram.swift; sourceTree = ""; }; DFB3897E1CEBAA57001DDCCE /* LoginError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginError.swift; sourceTree = ""; }; DFB389801CEBAA98001DDCCE /* OAuth2Error.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2Error.swift; sourceTree = ""; }; DFB389851CECFBFC001DDCCE /* Google.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Google.swift; path = LoginProviders/Google.swift; sourceTree = ""; }; @@ -87,7 +85,6 @@ children = ( DF74EC491CE2ACF0008F16BF /* Facebook.swift */, DFB389851CECFBFC001DDCCE /* Google.swift */, - DF8674F81D1A0351005C636A /* Instagram.swift */, A132748D1D3750DC002ED68B /* VKontakte.swift */, ); name = LoginProviders; @@ -204,7 +201,6 @@ DF74EC4A1CE2ACF0008F16BF /* Facebook.swift in Sources */, DFB389811CEBAA98001DDCCE /* OAuth2Error.swift in Sources */, DFB3897F1CEBAA57001DDCCE /* LoginError.swift in Sources */, - DF8674F91D1A0351005C636A /* Instagram.swift in Sources */, DF74EC471CE2AC6F008F16BF /* Simplicity.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Simplicity/LoginProviders/Instagram.swift b/Simplicity/LoginProviders/Instagram.swift deleted file mode 100644 index ff69751..0000000 --- a/Simplicity/LoginProviders/Instagram.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// Instagram.swift -// Simplicity -// -// Created by Edward Jiang on 6/21/16. -// Copyright © 2016 Stormpath. All rights reserved. -// - -import UIKit - -/** - Class implementing Instagram's implicit grant flow. - - ## Using Instagram in your app. - - To get started, you first need to [register an - application](https://www.instagram.com/developer/) with - Instagram. After registering your app, go into your client settings page. Under - the security tab, add `instagram[CLIENT_ID_HERE]://authorize` as a valid - redirect URI, replacing `[APP_ID_HERE]` with your Instagram Client ID. - - Finally, open up your App's Xcode project and go to the project's - info tab. Under "URL Types", add a new entry, and in the URL schemes form - field, type in `instagram[CLIENT_ID_HERE]`. Then, you can initiate the login - screen by calling: - ``` - Simplicity.login(Instagram()) { (accessToken, error) in - // Insert code here - } - ``` - */ -public class Instagram: OAuth2 { - public init() { - guard let urlScheme = Helpers.registeredURLSchemes(filter: {$0.hasPrefix("instagram")}).first else { - preconditionFailure("You must configure your Instagram URL Scheme to use Instagram login.") - } - let clientId = urlScheme.substringFromIndex(urlScheme.startIndex.advancedBy(9)) - - let authorizationEndpoint = NSURL(string: "https://api.instagram.com/oauth/authorize/")! - let redirectEndpoint = NSURL(string: urlScheme + "://authorize")! - - super.init(clientId: clientId, authorizationEndpoint: authorizationEndpoint, redirectEndpoint: redirectEndpoint, grantType: .Implicit) - - self.scopes = ["basic"] - } -}