       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'))


          decrypted_assertion = (new xmldom.DOMParser()).parseFromString(result)
          check_saml_signature result, identity_provider.certificate, cb_wf
        (cb_wf) -> parse_assertion_attributes decrypted_assertion, cb_wf
        (assertion_attributes, cb_wf) ->
          user = _.extend pretty_assertion_attributes(assertion_attributes), attributes: assertion_attributes
          cb_wf null, user
      ], cb

    # -- Optional
    # Returns a redirect URL, at which a user is logged out.
    create_logout_url: (user, identity_provider, cb) ->
      return

    # Returns XML metadata, used during initial SAML configuration
