         password = auth.split(':')[1]
         # Check if application is well authenticated
         if password isnt undefined and tokens[username] is password
-            console.log("application " + username + " is authenticated")
             callback null, true, username
         else
-            console.log("Wrong authentication")
-            console.log("Token expected : " + tokens[username])
-            console.log("Token received : " + password)
             callback null, false, username
     else
-        console.log "Warning : application is not authenticated : no field " +
-            "authorization"
         callback null, false, null
 
 

## @callback {function} Continuation to pass control back to when complete.
## Check if application is proxy
## Useful for register and login requests
module.exports.checkProxy = (auth, callback) ->
    if process.env.NODE_ENV is "production"
        if auth isnt "undefined" and auth?
            # Recover username and password in field authorization

                    docType = docType.toLowerCase()
                    # Check if application can manage docType
                    if permissions[name][docType]?
                        callback null, true, true
                    else if permissions[name]["all"]?
                        callback null, true, true
                    else
                        callback null, true, false
                else
                    callback null, true, true
            else
                callback null, false
    else
        callback null, true, true


## function checkProxy (auth, callback)
