Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (589)
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 2209 times)
0 Members and 1 Guest are viewing this topic.
Offline emerald

Senior Newbie





« Posted 2006-06-20 04: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 19: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 04: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!
Legends of Yore - The Casual Retro Roguelike
Offline Jeff

JGO Coder




Got any cats?


« Reply #3 - Posted 2006-06-21 18: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 10: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 Devvie




We live for the code, we die for the code


« Reply #5 - Posted 2006-06-22 14: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 21: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 07: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.

 

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

The first screenshot will be displayed as a thumbnail.

trollwarrior1 (20 views)
2014-11-22 12:13:56

xFryIx (69 views)
2014-11-13 12:34:49

digdugdiggy (48 views)
2014-11-12 21:11:50

digdugdiggy (42 views)
2014-11-12 21:10:15

digdugdiggy (36 views)
2014-11-12 21:09:33

kovacsa (60 views)
2014-11-07 19:57:14

TehJavaDev (63 views)
2014-11-03 22:04:50

BurntPizza (61 views)
2014-11-03 18:54:52

moogie (76 views)
2014-11-03 06:22:04

CopyableCougar4 (77 views)
2014-11-01 23:36:41
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!