                 callback()
 
 
+# Load landing page to retrieve the csrf token needed in login request.
+# More info on csrf -> https://en.wikipedia.org/wiki/Cross-site_request_forgery
+#
+# The sourceAlias input is also needed in login request, his goal is unknown
+#
+# The html parsing is done with cheerio, a "jquery like" server side
 retrieveTokens = (requiredFields, entries, data, next) ->
     log.info 'Retrieve Tokens'
     opts =
         url: 'https://linkedin.com'
         jar: true
-        headers:
-            'User-Agent': agent
 
     request.get opts, (err, res, body) ->
         return next err if err




logIn = (requiredFields, entries, data, next) ->
    log.info 'Attempt login'
    opts =

        url: contacts
        jar: true
        json: true

    request.get opts, (err, res, body) ->
        return next err if err
