en:suckerserv:auth
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
en:suckerserv:auth [2011/06/17 21:14] – created piernov | en:suckerserv:auth [2014/10/26 22:28] (Version actuelle) – [SuckerServ] piernov | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Auth with HopMod-v4 ====== | + | ====== Auth with SuckerServ-v5 ====== |
- | Because Authserver isn't included anymore in HopMod-v4, you'll need to clone the trunk repository: | + | Because Authserver isn't included anymore in SuckerServ-v5, you'll need to checkout |
<code bash> | <code bash> | ||
- | svn checkout | + | svn co http://suckerserv.googlecode.com/ |
- | cd hopmod-trunk | + | cd suckerserv-v3 |
</ | </ | ||
===== Dependencies ===== | ===== Dependencies ===== | ||
Ligne 9: | Ligne 9: | ||
If you want to use a MySQL Database, you'll need : | If you want to use a MySQL Database, you'll need : | ||
* a working MySQL server, with a dedicated database and user for the authserver. | * a working MySQL server, with a dedicated database and user for the authserver. | ||
- | * the MySQL-Client | + | * the MySQL-Client |
==== With SQLite3 ==== | ==== With SQLite3 ==== | ||
- | All requiered dependencies are shipped with HopMod | + | All requiered dependencies are shipped with SuckerServ |
==== With a text database ==== | ==== With a text database ==== | ||
No dependencies requiered | No dependencies requiered | ||
Ligne 19: | Ligne 19: | ||
chmod +x compile.sh | chmod +x compile.sh | ||
./ | ./ | ||
- | </ | ||
- | === With MySQL === | ||
- | <code bash> | ||
- | cd release_build | ||
- | make luasql_mysql | ||
- | cp src/ | ||
</ | </ | ||
===== Configuration ===== | ===== Configuration ===== | ||
Ligne 36: | Ligne 30: | ||
Edit the conf/ | Edit the conf/ | ||
<code bash># | <code bash># | ||
+ | Set correctly the hostname (localhost by default), the port (3306 by default), the database, the username, the password and remove " | ||
Add a # at the beginning of this one: | Add a # at the beginning of this one: | ||
<code bash> | <code bash> | ||
- | ==== HopMod | + | ==== SuckerServ |
- | All '' | + | |
=== Auth.lua === | === Auth.lua === | ||
- | Add an '' | + | Add an '' |
+ | **WARNING: | ||
<code lua auth.lua> | <code lua auth.lua> | ||
auth.directory.server{ | auth.directory.server{ | ||
- | id = "localhost", | + | id = "suckerserv", |
- | hostname = "localhost", | + | hostname = "127.0.0.1", |
port = 28787 | port = 28787 | ||
} | } | ||
auth.directory.domain{ | auth.directory.domain{ | ||
- | id = "localhost: | + | id = "suckerserv", |
- | server = "localhost" | + | server = "suckerserv" |
} | } | ||
auth.directory.domain{ | auth.directory.domain{ | ||
- | id = "localhost: | + | id = "suckerserv: |
- | server = "localhost" | + | server = " |
+ | } | ||
+ | |||
+ | auth.directory.domain{ | ||
+ | id = " | ||
+ | server = "suckerserv" | ||
} | } | ||
</ | </ | ||
Ligne 66: | Ligne 66: | ||
############################################################################### | ############################################################################### | ||
- | admin_domains "localhost: | + | admin_domains "suckerserv: |
- | invadmin_domains "localhost: | + | invadmin_domains "suckerserv: |
- | auto_invadmin_domains "localhost: | + | auto_invadmin_domains "suckerserv: |
- | name_reservation_domain " | + | |
- | stats_use_auth 1 | + | master_domains " |
- | stats_auth_domain | + | invmaster_domains |
- | stats_overwrite_name_with_authname 1 | + | auto_invmaster_domains " |
- | module " | + | name_reservation_domain " |
- | module " | + | auth_domains " |
+ | |||
+ | module " | ||
+ | module " | ||
+ | module " | ||
+ | #module " | ||
</ | </ | ||
===== Using authserver ===== | ===== Using authserver ===== | ||
+ | ==== With MySQL ==== | ||
+ | Run once the authserver, and then remove the '' | ||
==== Run it ==== | ==== Run it ==== | ||
To launch the authserver, just do: | To launch the authserver, just do: | ||
<code bash> | <code bash> | ||
- | In the hopmod-trunk directory | + | In the suckerserv-v3 directory |
==== Adding domains ==== | ==== Adding domains ==== | ||
- | <code bash> | + | <code bash> |
- | <code bash> | + | <code bash> |
+ | <code bash> | ||
==== Adding users ==== | ==== Adding users ==== | ||
Before adding users, you have to add domains, described before.\\ | Before adding users, you have to add domains, described before.\\ | ||
Ligne 92: | Ligne 99: | ||
Then copy the output. The first line is the private key, the one that you have to give to the user.\\ | Then copy the output. The first line is the private key, the one that you have to give to the user.\\ | ||
The user add something like this: | The user add something like this: | ||
- | <code bash> | + | <code bash> |
in his auth.cfg\\ | in his auth.cfg\\ | ||
The second line is the public_key, you have to add it in the database: | The second line is the public_key, you have to add it in the database: | ||
- | <code bash> | + | <code bash> |
- | Now same for admin, but replace the domain by your admin domain:\\ | + | Now same for master, but replace the domain by your master domain:\\ |
+ | The master add this in his auth.cfg | ||
+ | <code bash> | ||
+ | And in the server: | ||
+ | <code bash> | ||
+ | And same for admin, but replace the domain by your admin domain:\\ | ||
The admin add this in his auth.cfg | The admin add this in his auth.cfg | ||
- | <code bash> | + | <code bash> |
And in the server: | And in the server: | ||
- | <code bash> | + | <code bash> |
Remember, an authkey is unique, so don't loose it, and create one for each user. | Remember, an authkey is unique, so don't loose it, and create one for each user. | ||
==== Restart the authserver ==== | ==== Restart the authserver ==== | ||
- | After adding an authkey, | + | After adding an authkey, |
<code bash> | <code bash> | ||
<code bash> | <code bash> | ||
===== In-Game ===== | ===== In-Game ===== | ||
- | Now, all admin, | + | Now, all admins |
And all users must have their authkey for the server doesn' | And all users must have their authkey for the server doesn' | ||
And all stats are recorded into single name, even changing it or IP, if you keep the authkey.\\ | And all stats are recorded into single name, even changing it or IP, if you keep the authkey.\\ |
en/suckerserv/auth.1308338074.txt.bz2 · Dernière modification : 2014/05/31 00:26 (modification externe)