Welcome, Guest
Guest Settings

Thread: Datasnap Authentication

This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Permlink Replies: 0 Threads: [ Previous | Next ]
Clement Doss

Posts: 126
Registered: 9/19/00
Datasnap Authentication  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 13, 2017 3:34 PM

Is there a forum for Datasnap questions? I will try this one.

I want to Authenticate a user, and from what I saw, datasnap wizard creates a ServerContainer with aDSAuthenticationManager.
There's an event that get's triggered :

  lToken : String;
  Valid := False;
  { TODO : Validate the client user and password.
    If role-based authorization is needed, add role names to the UserRoles parameter  }
  valid := lCheckUser.UserAuthenticate(User,Password, lToken);

What I need to do is to return 'lToken' instead of 'valid' . lToken will be a unique value the client must use in every request made for as long as the token is valid. Should I be using DSAuthentication for this? Is there an already made Datasnapy solution, or should I write my own authentication mechanism?
Is there a demo or code sample that helps me? (youtube link would be fine too). Please do not post links where the author hard codes user and password in DSAuthentication event.

Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02