SimulatorLoginProtocol

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Step 1)
(Details)
Line 189: Line 189:
 
** "last" - start in the location from which the user last logged out.
 
** "last" - start in the location from which the user last logged out.
 
** A specific location.  This is in the format "uri:<region-name>&amp;<x-coord>&amp;<y-coord>&amp;<z-coord>".  For instance, the string "uri:test&amp;128&amp;128&amp;0" above signals that the user should login to the center of the region named test (the avatar is placed on the ground if given a z-coordinate below terrain).
 
** A specific location.  This is in the format "uri:<region-name>&amp;<x-coord>&amp;<y-coord>&amp;<z-coord>".  For instance, the string "uri:test&amp;128&amp;128&amp;0" above signals that the user should login to the center of the region named test (the avatar is placed on the ground if given a z-coordinate below terrain).
 +
* '''version''' - Version number of the viewer/client connecting.
 +
* '''channel''' - Name of the viewer/client connecting.
 +
* '''platform''' - Probably the platform of the client/viewer.  Currently ignored by OpenSimulator.  This is probably not particularly important anyway - Singularity 1.8.5.5617, for instance, has this set to "Win" even on the Linux platform.
 +
* '''mac''' - MAC address of the network card used by the client/viewer to make the connection.
 +
* '''id0''' - A GUID.  Function unknown.  Currently unused by OpenSimulator.
 +
* '''skipoptional''' - A boolean.  Function unknown.  Currently unused by OpenSimulator.
 +
* '''last_exec_event''' - An integer.  Function unknown.  Currently unused by OpenSimulator.
 +
* '''options''' - A list of strings.  Function unknown, though probably used in many cases to control the data sent back by the login service.  Currently unused by OpenSimulator which just sends back all data every time.
  
 
== Code ==
 
== Code ==

Revision as of 14:53, 18 September 2014

(This page is a work in progress)

Contents

Process

There are 4 basic steps to the viewer login process.

Step 1

The viewer contacts the grid login service. On a viewer, this can be specified by the -loginuri command line switch or by picking a grid in the grid manager of a viewer that provides this.

The viewer sends an XMLRPC login_to_simulator message to the loginuri. This provides

  • "first" - User first name
  • "last" - User last name
  • "passwd" - Hashed password
  • "version" - Viewer version
  • "start" - Start location. If "home" then the user's home location, "last" is the user's location on previous logout. Start can also be a named region and location (see data section below for more information on this).

Step 2

If the user is authenticated, the simulator at which they want to start is contacted and told that they are coming. It is passed a circuit code for that viewer.

Step 3

If the simulator will accept the user, then the user is passed the details of this simulator (chiefly the URI to use, as well as the circuit code).

Step 4

The viewer connects directly to the simulator and is authenticated using the circuit code.

Details

The simulator exposes an XML-RPC method called login_to_simulator at the loginuri URL. This takes a number of parameters from the viewer. Here's an example call.

<?xml version="1.0"?>
<methodCall>
  <methodName>login_to_simulator</methodName>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>first</name>
            <value>
              <string>Justin</string>
            </value>
          </member>
          <member>
            <name>last</name>
            <value>
              <string>Clark-Casey</string>
            </value>
          </member>
          <member>
            <name>passwd</name>
            <value>
              <string>$1$7c53d3d3f9d6f353a0f78cd5c2bfd772</string>
            </value>
          </member>
          <member>
            <name>start</name>
            <value>
              <string>uri:test&amp;128&amp;128&amp;0</string>
            </value>
          </member>
          <member>
            <name>version</name>
            <value>
              <string>1.8.5.5617</string>
            </value>
          </member>
          <member>
            <name>channel</name>
            <value>
              <string>Singularity Release 64</string>
            </value>
          </member>
          <member>
            <name>platform</name>
            <value>
              <string>Win</string>
            </value>
          </member>
          <member>
            <name>mac</name>
            <value>
              <string>fcec27eea5713b37d492bfa1c54d0fdf</string>
            </value>
          </member>
          <member>
            <name>id0</name>
            <value>
              <string>dda45b4a650be300c0c9746c6d70e57a</string>
            </value>
          </member>
          <member>
            <name>skipoptional</name>
            <value>
              <string>true</string>
            </value>
          </member>
          <member>
            <name>last_exec_event</name>
            <value>
              <int>0</int>
            </value>
          </member>
          <member>
            <name>options</name>
            <value>
              <array>
                <data>
                  <value>
                    <string>inventory-root</string>
                  </value>
                  <value>
                    <string>inventory-skeleton</string>
                  </value>
                  <value>
                    <string>inventory-lib-root</string>
                  </value>
                  <value>
                    <string>inventory-lib-owner</string>
                  </value>
                  <value>
                    <string>inventory-skel-lib</string>
                  </value>
                  <value>
                    <string>initial-outfit</string>
                  </value>
                  <value>
                    <string>gestures</string>
                  </value>
                  <value>
                    <string>event_categories</string>
                  </value>
                  <value>
                    <string>event_notifications</string>
                  </value>
                  <value>
                    <string>classified_categories</string>
                  </value>
                  <value>
                    <string>adult_compliant</string>
                  </value>
                  <value>
                    <string>buddy-list</string>
                  </value>
                  <value>
                    <string>ui-config</string>
                  </value>
                  <value>
                    <string>max_groups</string>
                  </value>
                  <value>
                    <string>max-agent-groups</string>
                  </value>
                  <value>
                    <string>map-server-url</string>
                  </value>
                  <value>
                    <string>tutorial_setting</string>
                  </value>
                  <value>
                    <string>login-flags</string>
                  </value>
                  <value>
                    <string>global-textures</string>
                  </value>
                </data>
              </array>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>

The parameters are as follows

  • first - First name of the user.
  • last - Last name of the user.
  • passwd - MD5 hash of the user's password with the string "$1$" prepended.
  • start - The region in which the user should start upon login. This is one of
    • "home" - start in the user's home location.
    • "last" - start in the location from which the user last logged out.
    • A specific location. This is in the format "uri:<region-name>&<x-coord>&<y-coord>&<z-coord>". For instance, the string "uri:test&128&128&0" above signals that the user should login to the center of the region named test (the avatar is placed on the ground if given a z-coordinate below terrain).
  • version - Version number of the viewer/client connecting.
  • channel - Name of the viewer/client connecting.
  • platform - Probably the platform of the client/viewer. Currently ignored by OpenSimulator. This is probably not particularly important anyway - Singularity 1.8.5.5617, for instance, has this set to "Win" even on the Linux platform.
  • mac - MAC address of the network card used by the client/viewer to make the connection.
  • id0 - A GUID. Function unknown. Currently unused by OpenSimulator.
  • skipoptional - A boolean. Function unknown. Currently unused by OpenSimulator.
  • last_exec_event - An integer. Function unknown. Currently unused by OpenSimulator.
  • options - A list of strings. Function unknown, though probably used in many cases to control the data sent back by the login service. Currently unused by OpenSimulator which just sends back all data every time.

Code

The parts of OpenSimulator that handle steps 1 and 2 can be found in OpenSim.Services.LLLoginService package.

References

http://justincc.org/blog/2011/05/26/opensimulators-login-process-and-common-login-problems/ provides some diagrams that illustrate the login process.

Personal tools
General
About This Wiki