0

I have implemented GAM (external authentication) for my SmartDevices project, that uses "Dynamic URL" (in GeneXus).

I have just received a new requirement: - In the default (demo) environment, the App must accept ANY username/password combination and give it the External ID "200" (this number will then be used in the app to retrieve data for a DEMO account).

In my Demo environment, using GamHome, I changed the "external webservice" to always return "1" (user and password ok) and "200" (External Id). When I run the App and try to authenticate with any random username, i receive the message: "External Identification of the user already exists" (something like that).

Is it possible for me to change the Authentication WebService in order to, either:

  • Allow multiple Usernames to share the same External Id?
  • Replace the username provided by the LoginExternal method (the device) in order to ensure a unique "ID - Username"?
  • Cancel the Login procedure and create a new one, automatic, with a fixed user?

Any other suggestions?

(I'd like to change services only to avoid changing the Apps, if possible).

(This is a requirement for our Demo environment only - in a Live environment, each user will have its own Id and will be properly authenticated).

Jaime
  • 159
  • 2
  • 10

1 Answers1

0

External IDs must be unique. For a Demo Environment, you could just login always with a fixed user and password (regardless of the credentials typed in by the user). You may, in that case, provide some mechanisms to filter data by device in demo mode, to ensure that multiple demoing users get the right experience.

Armin Bachmann
  • 455
  • 2
  • 11
  • Login with a fixed user would be a solution. But it requires me to change the client-side event on the App, right? (if &ServerURL = 'DemoEnvir' &User = 'DemoUser') – Jaime Mar 02 '15 at 11:59
  • Is there anything I can do in my Authentication WebService to accomplish this, without having to change the App itself? – Jaime Mar 02 '15 at 12:01
  • When using External Authentication 2.0 http://wiki.genexus.com/commwiki/servlet/hwikibypageid?21555 you can add additional parameters so that the service then identifies the user as a Demo User. – Armin Bachmann Mar 02 '15 at 17:59
  • If "1234" is entered as UserName and the device calls: SDActions.LoginExternal("ExternalWebService","1234","password"), can I , later, in my authentication procedure, authenticate with "DemoUser" and completely ignore the "1234" username? – Jaime Mar 02 '15 at 18:12
  • I can't see a way of doing that, because it seems that the procedure doesn't manage Username/Password, it only gets them and returns an "OK" or "NOK". – Jaime Mar 02 '15 at 18:21
  • I am changing the App to default the username/password if NetworkAPI returns the Demo Address. This is not an issue for me anymore. But if there is a way of doing this, I'd love to know. Thanks :) – Jaime Mar 02 '15 at 18:23