 let kQueryIssuerKey = "issuer"
 
 extension Token {
-    class func tokenWithURL(url: NSURL, secret: NSData? = nil) -> Token? {
+    class func tokenWithURL(url: NSURL, secret externalSecret: NSData? = nil) -> Token? {
         if (url.scheme != kOTPAuthScheme) { return nil }
 
         var queryDictionary = Dictionary<String, String>()

            }
        }

        var type = TokenType.Timer
        if let typeFromURL = TokenType.fromRaw(url.host) {
            type = typeFromURL
        } else {
            return nil
        }

        var secretForToken = NSData()
        if let secret = secret {
            secretForToken = secret
        } else {
            if let secretString = queryDictionary[kQuerySecretKey] {
                secretForToken = NSData(base32String:secretString)
            }
        }

        var name = ""
        if let path = url.path {

            if components.count > 1 {
                issuer = components[0]
                name = name.substringFromIndex(issuer.utf16count + 1).stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())
            }
        }

