rapp-project / rapp-api

The Robotic Applications API
http://rapp-project.eu
Other
6 stars 4 forks source link

Object detection API calls in python #48

Closed maciek-slon closed 8 years ago

maciek-slon commented 8 years ago

Related platform PR: https://github.com/rapp-project/rapp-platform/pull/346

klpanagi commented 8 years ago

Hi @maciek-slon

A few modifications are required in order to merge this PR:

You can have a look here on how user authentication is performed using credentials.

maciek-slon commented 8 years ago

I need a way to have persistent storage for each user to store its models. At the moment user is used as a folder name under rapp_platform_files directory. Can I pass the token directly to ROS services (and use it as folder name), or is it security issue or sth?

klpanagi commented 8 years ago

O each call to the RAPP Platform services, a token is required for authentication purposes. If you use the python API, the token is automatically loaded from ~/.config/rapp_platform/tokens/app as described here

On the Platform-side, on a request arrival, the request is first authenticated using that token. If authentication succeeds, the web service implementation callback is called and the username can be retrieved from the req object passed to the callback (req.username).

So in general, while using the python platform API, there is no need to send user information as those are automatically retrieved on the Platform and passed to the web service implementation (callback).

Also, there exist two web service implementation templates here

I have placed a comment on the related rapp-platform PR here

Let me know if you need any further information.

maciek-slon commented 8 years ago

Username removed from service calls.

klpanagi commented 8 years ago

@maciek-slon sorry for my late response. Can you to do this pull-request on branch python please; because this is related to the python implementation of the rapp-platform-api

maciek-slon commented 8 years ago

New PR: #51