                                 self.delegate?.oauthFail(self, error: NSError.error("", code: 0, description: ""))
                             }
                         }
-                        
-                        
+
+
                         print(result)
                     })
                     self.task!.resume()

                        "Content-Type": "application/x-www-form-urlencoded",
                        "Accept": "application/json"
                    ]
                    let url = URL(string: self.baseURL + "/oauth/access_token")
                    var request = URLRequest(url: url!, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 60.0)
                    request.allHTTPHeaderFields = headers
                    request.httpMethod = "POST"


    open weak var delegate: CLOAuthViewControllerDelegate?

    public init(baseURL: String, authorizePath: String = "/oauth/authorize", accessTokenPath: String = "/oauth/access_token",
                clientId: String, clientSecret: String, scopes: Array<String>, redirectUri: String) {
        self.baseURL = baseURL
        self.authorizePath = authorizePath
        self.accessTokenPath = accessTokenPath
        self.clientId = clientId
        self.clientSecret = clientSecret
        self.scope = scopes.joined(separator: ",")
