aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/login_system.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/login_system.html')
-rw-r--r--docs/doxygen/nel/login_system.html176
1 files changed, 176 insertions, 0 deletions
diff --git a/docs/doxygen/nel/login_system.html b/docs/doxygen/nel/login_system.html
new file mode 100644
index 00000000..13773148
--- /dev/null
+++ b/docs/doxygen/nel/login_system.html
@@ -0,0 +1,176 @@
+<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+ <TITLE>nevrax.org : docs</TITLE>
+ <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css">
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</HEAD>
+<BODY MARGINHEIGHT="0" MARGINWIDTH="0">
+
+<!-- uplinks -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ </TR>
+</TABLE>
+
+<!-- banner Nevrax -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
+ <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
+</TABLE>
+
+<!-- main table -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+ <!------ Begin Box ------>
+ <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
+ <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF>
+ <TABLE cellspacing=0 cellpadding=1 border=0>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr>
+ </TABLE>
+ </TD></TR></TABLE></TD></TR></TABLE>
+ <!------ End Box ------>
+
+ </TD>
+ <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+<!-- title -->
+<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td>
+<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
+</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
+</td></tr></table>
+&nbsp;
+
+<!-- block -->
+<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD>
+ <TD><B>Documentation</B></TD>
+ <TD ALIGN=RIGHT>&nbsp;</td>
+</tr></table>
+<!-- Generated by Doxygen 1.2.14 -->
+<center>
+<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
+<hr><a name="login_system"><h2>How the login system works ?</h2></a>
+ <dl compact><dt><b>
+Id: </b><dd>
+ login_system.dxt,v 1.2 2002/09/30 14:02:40 lecroart Exp </dl>
+<p>
+<dl compact><dt><b>
+Author: </b><dd>
+Vianney Lecroart</dl><dl compact><dt><b>
+Date: </b><dd>
+09/30/2002</dl><a name="login_system_intro"><h3>Introduction</h3></a>
+
+<p>
+This document briefly describes the connection process of a client to a shard running a NeL-based system.
+<p>
+Here it is a picture that displays different system with interaction between them:
+<p>
+<div align="center">
+<img src="login_system.png" alt="login_system.png">
+</div>
+ <a name="login_system_abbr"><h3>Abbreviations</h3></a>
+
+<p>
+<ul>
+<li><b>LS</b>: Login Service (a single unique LS services the entire shard set) that accept connection from web server on port 49990 and accept Welcome Service on port 49998.<li><b>WS</b>: Welcome Service (one for each shard).<li><b>FS</b>: FrontEnd Service (N per shard), port numbers are dynamically attributed by the Naming Service.<li><b>NL</b>: nel_launcher, it's the program on the client side that the player launch. This program is used to identify, select a shard and patch the game. It also launchs the game with good parameters to identiy the game to the shard.</ul>
+<a name="login_system_steps"><h3>Login system steps</h3></a>
+
+<p>
+<ul>
+<li><b>Step1</b>: The client launchs the NL and automatically connects to the login server (cnx1).</ul>
+<ul>
+<li><b>Step2</b>: The Web Server, using NeL Login Webpages and the NeL Database decides if the user has a valid login password (cnx2). It also sends the list of available shard to the NL</ul>
+<ul>
+<li><b>Step3</b>: The user selects the shard he wants to connect to. If the NL has to patch the client it connects to the Patch Directory and process the patch. After that, the NL sends the selected shard to the Web Server.</ul>
+<ul>
+<li><b>Step4</b>: The Web Server connects (cnx4) to the LS using a fake NeL TCP connection (with a php script) and send the client requests, the LS sends the requests to the selected Welcome Service (cnx5) and creates a uniq cookie for this client.</ul>
+<ul>
+<li><b>Step5</b>: The WS looks which FS is the best to receive the client and returns the FS IP to the LS and send the information to the selected FS to says that it'll receive a client with this cookie (cnx6). The LS forwards to the php and then forward to the NL.</ul>
+<ul>
+<li><b>Step6</b>: The NL has now the FS IP and cookie. It connects to the FS and sends the cookie (cnx7). The FS checks if the client IP and cookie is valid and send to the WS that the client is effectively connected. The WS forwards that to the LS and the LS updates the NeL Database (cnx3) to says that the user is online.</ul>
+<a name="logout_system_steps"><h3>Logout system steps</h3></a>
+
+<p>
+The FS detects the deconnection of a client, sends a message to the WS that is forward to the LS. Then, the LS updates the NeL database setting the user offline.
+<p>
+<a name="nel_launcher_config"><h3>nel_launcher configuration</h3></a>
+
+<p>
+The configuration parameters are in the nel_launcher.cfg.
+<p>
+<ul>
+<li><b>StartupHost</b> is the server where the web server is. It's only an ip, not an URL<li><b>StartupPage</b> is where the first web page is. It must starts with a /</ul>
+The startup url is composed using this rule: <a href="http://">http://</a>&lt;StartupHost&gt;&lt;StartupPage&gt;
+<p>
+For example if StartupHost is "itsalive.nevrax.org" and StartupPage is "/login/welcome.php", the resulting url will be "<a href="http://itsalive.nevrax.org/login/welcome.php">http://itsalive.nevrax.org/login/welcome.php</a>",
+<p>
+<ul>
+<li><b>Application</b> is the application that the NS will launch when it's necessary. The first value is the application name that will be compared with the server database to select good shards. The second value is the executable filename with a path if necessary. the third value is the path where the launcher will go before executing the application.</ul>
+<a name="login_service_config"><h3>Login Service configuration</h3></a>
+
+<p>
+The configuration parameters are in the login_service.cfg.
+<p>
+<ul>
+<li><b>WSPort</b> is the port that will be used by the Welcome Service (default is 49998) to connect to the LS.<li><b>AcceptExternalShards</b> is 1 if the LS accept shard that are not already in the NeL database. If you set the value to 0, the shard will be disconnected if it s not in the database.<li><b>Beep</b> is 1 if you want the LS beeps when users comes (debug purpose and only on Windows).<li><b>DatabaseHost</b> is a string that contains the address of where the database server is. For example "localhost".<li><b>DatabaseName</b> is the name of the database where we can find needed info (default is "nel").<li><b>DatabaseLogin</b> is the login to access the database (default is "").<li><b>DatabasePassword</b> is the passwrd to access the database (default is "").<li><b>ForceDatabaseReconnection</b> can be anything. Change this value to force a configfile reload and reconnection to the database to take in count the new value of Database*. The content of this variable doesn't matter, it s just a fake to reload database var.</ul>
+<a name="welcome_service_config"><h3>Welcome Service configuration</h3></a>
+
+<p>
+The configuration parameters are in the welcome_service.cfg.
+<p>
+<ul>
+<li><b>LSHost</b> is an address of where the Login Service is (for example "localhost").<li><b>FrontendServiceName</b> is the little name of the frontend service that will be use to know when a FS is up or down using the naming service (default is "FS").<li><b>ShardId</b> is the value that identify the shard in the NeL Database. It must be uniq for each different shard.</ul>
+<a name="nel_database"><h3>NeL Database</h3></a>
+
+<p>
+The Database name is "nel" by default. It contains 2 tables; "shard" and "user".
+<p>
+<b>shard</b> <b>table</b>
+<p>
+<ul>
+<li><b>ShardId</b> is an int that identify a shard. It must be uniq and is used when a shard connects to the LS.<li><b>WsAddr</b> is a string that is the ip address in numerical format (127.0.0.1). This address is used to check if the shard can connect. The WsAddr must be the same as the connection and also the ShardId to accept a shard.<li><b>NbPlayers</b> unsigned int. Contains the number of player really connected to this shard.<li><b>Name</b> is the string that is display when displaying the list of available shards.<li><b>Online</b> is 1 if the shard is online an ready to accept players.<li><b>ClientApplication</b> is a string that must match the Application variables in the nel_launcher.cfg. It's used to display only shards that are compatible with the nel_launcher.<li><b>Version</b> is a string that represent the version of the shard. If the version is not the same on the client in the VERSION file and in the shard, the nel_launcher will have to patch to connect to this shard.</ul>
+<b>user</b> <b>table</b>
+<p>
+<ul>
+<li><b>UId</b> is a uniq number for a player.<li><b>Login</b> is the user login.<li><b>Password</b> is the user password.<li><b>ShardId</b> is the ShardId where the client is connected to if the user is online, otherwise the ShardId is -1<li><b>State</b> describes the user state, if he's online or not.</ul>
+<a name="web_notes"><h3>NeL Webpages</h3></a>
+
+<p>
+<ul>
+<li><b>index.php</b> contains all "customizable" php code. It manages the login/password verification using database access, display available shard and use cookie to remember users.</ul>
+<ul>
+<li><b>service_connection.inc</b> contains codes that enables the connection to the Login Service and send/receive messages.</ul>
+<ul>
+<li><b>make_patch.php</b> is a page that create all stuffs needed to realize a patch. It compress all files and create a dir.gz that contains all files with date and size used by the nel_launcher to patch a client.</ul>
+<a name="login_system_notes"><h3>Side notes</h3></a>
+
+<p>
+Whenever a shard starts, the WS establishes a permanent link with the LS. A validation on the LS will done to check that the shard is authorized to work on this login system using the WS IP and the ShardId.
+<p>
+<b>outofdate</b> If the LS detects that a person is trying to connect to an account that is already on use by another person, then the 2 people will be disconnected. The goal is to discourage people from sharing their accounts and also to avoid account deadlock in the case of bug. If for an obscur reason the user state in the LS is bad, then the next time the user tries to connect, they will be disconnected and their account will be reseted to the offline state and the user will be able to retry with a normal state.
+<p>
+A <em>cookie</em> is a class (<code>CLoginCookie</code> in <code>login_cookie.cpp)</code> that contains the web server's IP (<code><a class="el" href="memory__common_8h.html#a11">uint32</a>)</code> as seen by the LS (to avoid address translation problems) for validation, a unique key (<code><a class="el" href="memory__common_8h.html#a11">uint32</a>)</code> and the user id (<code><a class="el" href="memory__common_8h.html#a11">uint32</a>)</code>.
+<p>
+
+
+<!-- footer -->
+<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
+</TD>
+<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>