Class: DBus::External
- Inherits:
-
Authenticator
- Object
- Authenticator
- DBus::External
- Defined in:
- lib/dbus/auth.rb
Overview
External authentication class
Class for ‘external’ type authentication.
Instance Method Summary collapse
-
#authenticate ⇒ Object
Performs the authentication.
Methods inherited from Authenticator
Instance Method Details
#authenticate ⇒ Object
Performs the authentication.
31 32 33 34 35 36 37 38 |
# File 'lib/dbus/auth.rb', line 31 def authenticate # Take the user id (eg integer 1000) make a string out of it "1000", take # each character and determin hex value "1" => 0x31, "0" => 0x30. You # obtain for "1000" => 31303030 This is what the server is expecting. # Why? I dunno. How did I come to that conclusion? by looking at rbus # code. I have no idea how he found that out. return Process.uid.to_s.split(//).collect { |a| "%x" % a[0].ord }.join end |