       saml_response = (new xmldom.DOMParser()).parseFromString(new Buffer(request_body.SAMLResponse, 'base64').toString())
       decrypted_assertion = null
 
+      user = {}
+
       async.waterfall [
         (cb_wf) -> check_status_success saml_response, cb_wf
         (cb_wf) => decrypt_assertion saml_response, @private_key, cb_wf


    # -- Required
    # Returns a redirect URL, at which a user can login
    create_login_url: (identity_provider, cb) =>
      zlib.deflateRaw create_authn_request(@issuer, identity_provider.sso_login_url), (err, deflated) ->
        cb err if err?
        cb null, "#{identity_provider.sso_login_url}?SAMLRequest=" + encodeURIComponent(deflated.toString('base64'))


zlib          = require 'zlib'


create_authn_request = (issuer, assert_endpoint, destination) ->
  xmlbuilder.create
    AuthnRequest:
      '@xmlns': 'urn:oasis:names:tc:SAML:2.0:protocol'
