app/services/manager_management/sign_up/base.rb
# Create entry in manager device with active status
#
# * Author: Santhosh
# * Date: 22/05/2019
# * Reviewed By:
#
Create entry in manager device with active status
Author: Santhosh
Date: 22/05/2019
Reviewed By.
Create entry in manager device with active status Author : Santhosh Date : 22 / 05 / 2019 Reviewed By .
def create_authorized_device
        key = "#{@manager_obj.id}:#{@fingerprint}:#{@fingerprint_type}"
        unique_hash = LocalCipher.get_sha_hashed_text(key)
        expiration_timestamp = current_timestamp + GlobalConstant::ManagerDevice.device_expiration_time
        @manager_device = ManagerDevice.new( manager_id: @manager_obj.id,
                                             fingerprint: @fingerprint,
                                             fingerprint_type: @fingerprint_type,
                                             unique_hash: unique_hash,
                                             expiration_timestamp: expiration_timestamp,
                                             status: GlobalConstant::ManagerDevice.authorized
        )
        @manager_device.save!
        success
      end
def create_authorized_device key = "#{@manager_obj.id}:#{@fingerprint}:#{@fingerprint_type}" unique_hash = LocalCipher . get_sha_hashed_text ( key ) expiration_timestamp = current_timestamp + GlobalConstant :: ManagerDevice . device_expiration_time @manager_device = ManagerDevice . new ( manager_id : @manager_obj . id , fingerprint : @fingerprint , fingerprint_type : @fingerprint_type , unique_hash : unique_hash , expiration_timestamp : expiration_timestamp , status : GlobalConstant :: ManagerDevice . authorized ) @manager_device . save! success end
Create entry in manager device with active status
 Author: Santhosh
 Date: 22/05/2019
 Reviewed By:
Create entry in manager device with active status Author : Santhosh Date : 22 / 05 / 2019 Reviewed By :
# marking the first device for the manager as authorized