         httpManager = Alamofire.Manager(configuration: configuration)
     }
     
+    
     // MARK: OAuth
     
     /**
-    获取 access_token
-    
-    :returns: access_token
-    */
-    public func getAccessToken() {
-        if let authorizeCode = self.authorizeCode {
-            httpManager.request(.POST, "https://api.worktile.com/oauth2/access_token", parameters: ["client_id": self.clientID,"code":authorizeCode])
-                .responseJSON { (_, _, JSON, _) in
-
-                    var jsonDict = JSON as! [String:AnyObject]
-
-                    // Success
-                    if let accessToken = jsonDict["access_token"] as? String {
-                        self.accessToken = accessToken
-                    }else{
-                        // Error
-                        if let errorCode = jsonDict["error_code"] , errorMessage = jsonDict["error_message"] {
-                            print("access_token - error:\(errorCode),\(errorMessage)")
-                        }
-                    }
-                    
-                    if let refreshToken = jsonDict["refresh_token"] as? String {
-                        self.refreshToken = refreshToken
-                    }
-            }
-        }else{
-            print("error : No authorizeCode.")
-        }
-
-
-    }
-    
-    /**
-    刷新 access_token
-    
-    :returns: access_token
-    */
-    public func toRefreshToken(){
-        if let refreshToken = self.refreshToken {
-            Alamofire.request(.GET, URLString: "https://api.worktile.com/oauth2/refresh_token", parameters: ["client_id": clientID,"refresh_token": refreshToken])
-                .responseJSON { (_, _, JSON, _) in
-                    if let jsonDict = JSON as? Dictionary<String,AnyObject>{
-                        
-                        // Success
-                        if let accessToken = jsonDict["access_token"] as? String {
-                            self.accessToken = accessToken
-                        }
-                        
-                        // Error
-                        if let errorCode = jsonDict["error_code"] , errorMessage = jsonDict["error_message"] {
-                            print("refreshToken - error:\(errorCode),\(errorMessage)")
-                        }
-                    }
-            }
-        }
-    }
-
-    /// 获取授权视图控制器
-    public func authorizeViewController() -> UIViewController {
-        currentAuthorizeViewController = AuthorizeWebController(url: self.authorizeURL, delegate: self)
-        return currentAuthorizeViewController!
-    }
-    
-    /// 授权成功
+    授权成功的回调
+    */
     func authorizeComplate(authorizeCode: String?) {
         if let authorizeCode = authorizeCode {
             if authorizeCode.characters.count > 0 {

import UIKit
import Alamofire

public class Worktile : AuthorizeWebControllerDelegate {
    
    /// 申请应用时分配的 AppKey

    
    :param: finishCallback 返回内容
    */
    public func profile(finishCallback: DictionaryCallback) {
        if let accessToken = accessToken {
            httpManager.request(.GET, self.requestURL("user/profile"), parameters: ["access_token":accessToken])
                .responseJSON { (_, _, JSON, _) -> Void in
                    if let jsonDict = JSON as? Dictionary<String,AnyObject> {
                        
