app/controllers/authentication_controller.rb
# Handle cookie validation success response
# 1. set cookie
# 2. set authenticated param in params hash
# 3. remove autentication related critical data to sent in response
#
# * Author: Puneet
# * Date: 04/03/2019
# * Reviewed By: Sunil
#
Handle cookie validation success response
1. set cookie
2. set authenticated param in params hash
3. remove autentication related critical data to sent in response

Puneet
Date: 04/03/2019
Reviewed By: Sunil
Handle cookie validation success response 1 . set cookie 2 . set authenticated param in params hash 3 . remove autentication related critical data to sent in response Puneet Date : 04 / 03 / 2019 Reviewed By : Sunil
def handle_cookie_validation_success(cookie_verify_rsp, cookie_expiry)
    extended_cookie_value = cookie_verify_rsp.data[:extended_cookie_value]
    set_cookie(
        GlobalConstant::Cookie.user_cookie_name,
        extended_cookie_value,
        cookie_expiry
    ) if extended_cookie_value.present?
    params[:manager_id] = cookie_verify_rsp.data[:manager_id]
    params[:manager] = cookie_verify_rsp.data[:manager]
    params[:manager_device_id] = cookie_verify_rsp.data[:manager_device_id]
    params[:manager_device] = cookie_verify_rsp.data[:manager_device]
    params[:client_id] = cookie_verify_rsp.data[:client_id]
    params[:client] = cookie_verify_rsp.data[:client]
    params[:client_manager] = cookie_verify_rsp.data[:client_manager]
    cookie_verify_rsp.data = {}
  end
def handle_cookie_validation_success ( cookie_verify_rsp , cookie_expiry ) extended_cookie_value = cookie_verify_rsp . data [ :extended_cookie_value ] set_cookie ( GlobalConstant :: Cookie . user_cookie_name , extended_cookie_value , cookie_expiry ) if extended_cookie_value . present? params [ :manager_id ] = cookie_verify_rsp . data [ :manager_id ] params [ :manager ] = cookie_verify_rsp . data [ :manager ] params [ :manager_device_id ] = cookie_verify_rsp . data [ :manager_device_id ] params [ :manager_device ] = cookie_verify_rsp . data [ :manager_device ] params [ :client_id ] = cookie_verify_rsp . data [ :client_id ] params [ :client ] = cookie_verify_rsp . data [ :client ] params [ :client_manager ] = cookie_verify_rsp . data [ :client_manager ] cookie_verify_rsp . data = { } end
Handle cookie validation success response
1. set cookie
2. set authenticated param in params hash
3. remove autentication related critical data to sent in response
Handle cookie validation success response 1 . set cookie 2 . set authenticated param in params hash 3 . remove autentication related critical data to sent in response
# set cookie # set authenticated param in params hash # Remove sensitive data
cookie_verify_rsp
cookie_expiry