SAMP Web Profile register call

Mark Taylor m.b.taylor at bristol.ac.uk
Tue Jul 12 03:13:45 PDT 2011


Following discussions in Naples I propose to make one change to
the Web Profile API mapping from the 1.3-SAMP-20110512 WD.

In that draft, I had the following signature for the Web Profile 
register call:

    map register(string appName)

that is, the registering application just has to supply a name,
and the hub decides on the basis of that and perhaps on the details
of the HTTP call that it came in on whether to accept registration.
Part (the main part) of that decision will usually be based on 
presenting the name to the user in a popup dialogue.

I propose changing the signature to

   map register(map security-info)

where security-info is a map with a REQUIRED key samp.name, doing
exactly the same job as appName in the previous version.

The effect of this is precisely the same as before, but, it leaves
room for future addition of new optional or required keys to the
security-info map if we come up with other ways to enforce
authentication or other security measures in the future 
(some ideas in this direction came up in Naples), without making 
any disruptive changes to the interface.

I have provisionally made this change at:

   http://code.google.com/p/volute/source/detail?r=1537

If anybody disagrees with the idea or the details, please say so.

As far as implementation goes: I plan in JSAMP to fix it so that
either the new (map) or the old (string) is accepted, 
at least for the short term, so that the few trial Web Profile 
clients out there will continue to work, alongside those using
the newer API which all new Web Profile clients should do.

Luigi, do you think you can do the same in SAMPy?

Mark

--
Mark Taylor   Astronomical Programmer   Physics, Bristol University, UK
m.b.taylor at bris.ac.uk +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/


More information about the apps-samp mailing list