         auth = new Buffer(auth, 'base64').toString('ascii')
         username = auth.split(':')[0]
         password = auth.split(':')[1]
-        # Check if application is well authenticated
+        # Check if application is cozy-proxy
         if password isnt undefined and tokens[username] is password
             if username is "proxy"
                 console.log "proxy is authenticated"

        else 
            callback null, false

module.exports.checkProxy = (auth, callback) ->
    if auth isnt "undefined" and auth?
        # Recover username and password in field authorization

            "description": "..."
        "encryptedkeys":
            "description": "..."
    # Add proxy token and permissions
    tokens['proxy'] = token
    permissions.proxy =
        "user":
            "description": "description, user_proxy"
    # Add token and permissions for other started applications
    db.view 'application/all', (err, res) ->
        if (err)
            callback new Error("Error in view")
        else 
            # Search application
            res.forEach (appli) ->
                if appli.state is "installed"
                    tokens[appli.name] = appli.password 
