#1 2013-04-03 18:44:51

LoPiTaL
Member
Registered: 2013-01-04
Posts: 30

User registration and autentication

Hi everyone,
I think this is already answered, but I cannot find anything I can use.

My situation: I want to provide a server where anybody, via a web interface, can register a new user. Afterwards, the user will log in with his registered user name, and from here, all operations will be done logged in.
Since I am using a web interface for everything, I am going to use only the interface-based services as the interface with the server. Internally, these services will comunicate with the database layer to perform whatever.

About the security, everything must be secured (using the framework security options), but the registration of a new user, which, since there is no user yet, it cannot be secured.

So I am guessing that I will need two TSQLRestServerDB: one with the users database, the one which will handle the security and provide the interface needed for the application; and another TSQLRestServerDB which provides the actual application's database, this is right?
Also, to allow the users to register a new user without security, I may need a third server, this can be just a TSQLRestServerFullMemory, which will provide the interface needed for the creation of new users, with the HandleSecurity parameter set to false.

At the HTTP layer, I will use only one TSQLHttpServer with the two user handling servers passed in the creator.

Do all of this make sense? Or am I confused?

Best regards,
LoPiTaL

Offline

#2 2013-04-03 19:19:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,238
Website

Re: User registration and autentication

You can do everything you need with just one TSQLRestServer instance.

The easiest is to implement it as:
- Some method-based RESTful service to register a new user - you can use the TSQLRestServer.ServiceMethodByPassAuthentication() method in order to by-pass of the RESTful authentication scheme for the corresponding methods;
- Some interface-based RESTful services for all secured processed, including sessions and authentication.

I think it will fulfill your needs.

Offline

#3 2013-04-04 06:38:55

LoPiTaL
Member
Registered: 2013-01-04
Posts: 30

Re: User registration and autentication

Ok, I will try it. Thank you for your quick answer.

Best regards,
LoPiTaL

Offline

#4 2013-04-10 21:31:16

LoPiTaL
Member
Registered: 2013-01-04
Posts: 30

Re: User registration and autentication

As expected, it works perfectly fine, thank you.

Best regards,
LoPiTaL

Offline

Board footer

Powered by FluxBB