Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Adding new user login  (Read 1930 times)
0 Members and 1 Guest are viewing this topic.
Offline emerald

Senior Newbie





« Posted 2006-06-20 06:54:42 »

currently, the client needs to do verification and this includes the use of the passw.txt file. i was wondering if we can add new logins to the txt file to include more users.  technically, i think this is possible. but does sgs provides a way to add new user login?

if not, i think i will have to work around to do a registration form and update the passw.txt file.

any suggestions?

feelin rusty
Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2006-06-20 21:48:05 »

Not sure if I understood your question.

The client does not do the validation, the server does.   

On user connection,  the Validator specified in the deploymenty xml is instanced and invoked by the server.  It returns a  list of what information it needs to do validation.  The server then communciates this to the client..  The client collects this information and returns it to the server.

The FlatFileUserValidator, which is a simple example that ships with the SDK, uses the passwd.txt file.as its validation data.  This is a sever side file.  You cna edit it to add users.  I am pretty sure that there are comments in the file itself that explain its format.

As alluded to above, when we get the stack extension SDK out you will be able to write your own Validators that do authentication how ever you want.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline emerald

Senior Newbie





« Reply #2 - Posted 2006-06-21 06:44:48 »

thanks. stated in the deploy.xml

   <VALIDATOR moduleclass="com.sun.gi.comm.users.validation.impl.FlatFileUserValidator">
       <PARAMETER tag="password_file_url" value="file:passwd.txt" />
   </VALIDATOR>

but i couldnt locate the 'com.sun.gi.comm.users.validation.impl.FlatFileUserValidator' in the server api.  Huh

and in the passwd.txt there really aint any comments to tell indicate the purpose of field. but i roughly got the idea that the 1st field is the id and the 2nd field is the password.

i'm looking forward to the release of the stack extension SDK =)

feelin rusty
Games published by our own members! Check 'em out!
Try the Free Demo of Droid Assault
Offline Jeff

JGO Coder




Got any cats?


« Reply #3 - Posted 2006-06-21 20:44:13 »

thanks. stated in the deploy.xml

   <VALIDATOR moduleclass="com.sun.gi.comm.users.validation.impl.FlatFileUserValidator">
       <PARAMETER tag="password_file_url" value="file:passwd.txt" />
   </VALIDATOR>

but i couldnt locate the 'com.sun.gi.comm.users.validation.impl.FlatFileUserValidator' in the server api.  Huh
;/quote]

Its in the Jar.  Its not commented in the API docs becasue it is not aprt of the Server API.. its an example part of the Stack Extension API.

Quote
and in the passwd.txt there really aint any comments to tell indicate the purpose of field. but i roughly got the idea that the 1st field is the id and the 2nd field is the password.

Right.  a * for password will match any password entered.  The rest of the stuff on the line are permissions as single strings and are optional


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline emerald

Senior Newbie





« Reply #4 - Posted 2006-06-22 12:07:51 »

oh i see. thanks for the info. one more question: is it possible to do user registration with SGS?

if the user wanted to participate in a game, he/she needs to register first. but with the current SGS implementation, the login id and password are in the passwd.txt, which the application may not had access to. so what i have in mind is to use JSP, servlet and beans to read the passwd.txt file for existing password and to inform the user that that particular id has been taken else, it will update the passwd.txt of the new id and password. then the user can run the jar to login the game and play.

actually, i want to know how to do user registration with SGS.

feelin rusty
Offline beowulf03809

Junior Member




We live for the code, we die for the code


« Reply #5 - Posted 2006-06-22 16:05:19 »

It appears from some of the messages and documentation available that the version of SGS available for download now is really geared at initial development, PoC and beta environments. ( Jeff, please correct me if I'm wrong  Huh ).   In those cases direct communication between the potential player and the developer would be common (maybe even required) and the developer could manually update the authentication.

The expanded SDK  Jeff referenced will allow use of more dynamic authentication methods than basic flatfile and you will probably find easier methods available to you to authenticate against and add new users to a server-side database ( example ) rather than dealing with updating a flatfile.  Until that is available, I would imagine if you don't want to use the manual-entry method, you could create an extra layer at the front end like you suggested.  If the user does not already exist in the flatfile then instead of getting an authentication error they could be redirected to a page that will allow them to register a new name and password into the file.  But going thru too much work in that area when it's going to change soon ( and  you may not really need it yet anyway ) may not be worth it.

Just a thought.
Offline Jeff

JGO Coder




Got any cats?


« Reply #6 - Posted 2006-06-22 23:37:23 »

oh i see. thanks for the info. one more question: is it possible to do user registration with SGS?

if the user wanted to participate in a game, he/she needs to register first. but with the current SGS implementation, the login id and password are in the passwd.txt, which the application may not had access to. so what i have in mind is to use JSP, servlet and beans to read the passwd.txt file for existing password and to inform the user that that particular id has been taken else, it will update the passwd.txt of the new id and password. then the user can run the jar to login the game and play.

actually, i want to know how to do user registration with SGS.

The answer is that the FlatFileUserAuthenticator, as others have pointed out, is a minimal example intended as a guide and tool for developers.
The version of the SGS contaiend in the SDK is for <b>development purposes only</b>.  You cannot, by the license, run a service for users outside of your development group with it.

A real service would likely write their own authenticator using the stack extension SDK.  (Which is coming, but we've held up on releasing because we are doing an architectural review in light of the "big back end" which is the real, scalable server system that someone running a service would use.  Its possible that as a result of this review some interfaces may chnage some and we didnt want you to run off and start writing code that would be incompatable with the actual production environment.)

This custom authenticator would talk to their own database, or however else they themselves manage users.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline emerald

Senior Newbie





« Reply #7 - Posted 2006-06-23 09:30:52 »

thanks so much for the info. =)   Grin

feelin rusty
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Try the Free Demo of Revenge of the Titans

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (76 views)
2013-05-17 21:29:12

alaslipknot (87 views)
2013-05-16 21:24:48

gouessej (117 views)
2013-05-16 00:53:38

gouessej (112 views)
2013-05-16 00:17:58

theagentd (123 views)
2013-05-15 15:01:13

theagentd (112 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (177 views)
2013-05-12 15:36:09

UnluckyDevil (185 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.142 seconds with 20 queries.