     public func authorize(completion: Result<Token, Error> -> Void) {
         self.completion = completion
         
+        visit(URL: authorizeURL.queries(authRequestParams))
+    }
+    
+    /**
+     Refreshes the token.
+     
+     - parameter completion: The block to be executed when the refresh token process ends.
+     */
+    public func refreshToken(completion: Result<Token, Error> -> Void) {
+        guard let refreshToken = token?.refreshToken else {
+            let error = Error.Other("", "")
+            completion(Result.Failure(error))
+            return
+        }
+        
+        requestToken(.RefreshToken(refreshToken), completion: completion)
+    }
+    
+    /**
+     Handles the incoming URL.
+     
+     - parameter URL:     The incoming URL to handle.
+     - parameter options: A dictionary of launch options.
+     */
+    public func handleURL(URL: NSURL, options: [String: AnyObject]) {
+        guard shouldHandleURL(URL, options: options) else { return }
+        
+        safariVC?.dismissViewControllerAnimated(true, completion: nil)
+        NotificationCenter.removeObserver(self, name: UIApplicationDidBecomeActiveNotification)
+        
+        guard let completion = completion else { return }
+        
+        switch responseType {
+        case .Token: handleURLForTokenResponseType(URL, completion: completion)
+        case .Code: handleURLForCodeResponseType(URL, completion: completion)
+        }
+    }
+}
+
+// MARK: - Requests Params
+
+private extension Provider {
+    private var authRequestParams: [String: String?] {
         var params = [
             "client_id": clientID,
             "redirect_uri": redirectURL.absoluteString,


private extension Provider {
    func requestToken(grantType: GrantType, completion: Result<Token, Error> -> Void) {
        var params = [
            "client_id": clientID,
            "client_secret": clientSecret,
            "redirect_uri": redirectURL.absoluteString,
            "state": state
        ]
        
        grantType.params.forEach { params[$0] = $1 }
        
        additionalParamsForTokenRequest.forEach { params[$0] = String($1) }
        
        HTTP.POST(tokenURL!, parameters: params) { resultJSON in
            let result: Result<Token, Error>

        
        additionalParamsForAuthorization.forEach { params[$0] = String($1) }
        
        return params
    }
    
    func tokenRequestParams(grantType: GrantType) -> [String: String?] {
        var params = [
            "client_id": clientID,
            "client_secret": clientSecret,
            "redirect_uri": redirectURL.absoluteString,
            "state": state
        ]
        
        grantType.params.forEach { params[$0] = $1 }
        
        additionalParamsForTokenRequest.forEach { params[$0] = String($1) }
        
        return params
    }
}

