     return false
 
 class KodingKeyAuthenticator extends Authenticator
-  authenticate: (kodingKey)->
-    return true
+  authenticate: (token, kodingKey)->
+    token == kodingKey
 
 class TokenAuthenticator extends Authenticator
-  authenticate: (token)->
-    return true
+  authenticate: (token, kodingKey)->
+    kodingKey = 'NPhFRpZPYuWA4kFA7Y0ewEIQy7qdgj3ij6tegRQ9sd2s-g2-Debdi20fStRiIM5Z'
+    decryptedToken = decrypt(token, kodingKey)
+    if not decryptedToken
+      return false
+    console.log "-------------------------------------------"
+    console.log decryptedToken
+    console.log "-------------------------------------------"
+    JSON.parse decryptedToken
 
 authenticators =
   'kodingKey': new KodingKeyAuthenticator

    @options.environment  or= "development"
    @options.region       or= "localhost"
    @options.kontrolAddress or= 'ws://localhost:4000/dnode'

  readKeyFile: ()->
    kodingKey = fs.readFileSync path.join @basePath, "koding.key"

      if err
        return callback err, request
      cnt++
      if self.filters[cnt]?
        self.filters[cnt].run request, next
      else
        callback null, request
    @filters[0].run request, next

