Get UUID and device name

Hello,

To check the identity of a user, I need to get the UUID of his device.

In the development environment, I use this code :

report = `system_profiler SPNetworkDataType SPHardwareDataType | grep -e 'Hardware UUID:'`

It’s work fine, but not in production environment.

So, I need to find another solution.

With the UUID, I need to get the IP address.
I have found a solution :

request.ip

It’s work !

Unfortunately, request don’t give the UUID.
I need too the name of the device, to give to the user the choice of his device.
For example, if a user change his computer, he can remove the old device with the name.

Thank you very much for your help!