 
     open weak var delegate: CLOAuthViewControllerDelegate?
 
-    public init(baseURL: String, clientId: String, clientSecret: String, scopes: Array<String>, redirectUri: String) {
+    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: ",")

                        "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"

public protocol CLOAuthViewControllerDelegate: class {

    func oauthSuccess(_ viewController: CLOAuthViewController, accessToken: String)
    func oauthFail(_ viewController: CLOAuthViewController, error: NSError?)
}

open class CLOAuthViewController: UIViewController, WKNavigationDelegate, URLSessionDelegate {
