SimulatorLoginProtocol

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "(This page is a work in progress) == Process == There are 4 basic steps to the viewer login process. === Step 1 === The viewer contacts the grid login service. On a viewer, ...")
 
Line 28: Line 28:
  
 
The viewer connects directly to the simulator and is authenticated using the circuit code.
 
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.
 +
 +
<source lang='xml'>
 +
<?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>last</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>
 +
</source>
  
 
== Code ==
 
== Code ==

Revision as of 13:39, 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 SLURL (todo: document the format of 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>last</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>

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