not at first. I would create a special Model that talked to the web
service. The reason is that I don't really think you will end up
supporting a majority of the data source features so it may be more
work than you want. How would you deal with find queries at the dso
level? Does the api support anything like a query? Will you have any
kind of write-access (save, delete...)? The more of these questions
you can answer yes to the more sense it would make to create a dso.
On Jan 25, 9:39 pm, Josip Dzolonga <jdzolo...@gmail.com> wrote:
> Hello everyone,
>
> So I'm designing a web site that has a very specific architecture.
> _Some_ of the data is handled by a Java RESTful web service (there is
> a database as well). There are actually two things stored which I
> would like to have as models:
>
> 1) Users
> 2) Documents
>
> However, there are permissions as well (which I don' t have to
> handle), meaning that not all users have access to all documents. The
> authentication is done with http basic auth, so if a user wants to
> access document XYZ, he performs a get on /documents/XYZ with his user
> and password. So, when a user logs in to the web site, the application
> will have to store the username and password in the session and then
> make requests in the background to the web service with them to access
> documents. What is the best way to implement this using CakePHP? I
> thought of designing a custom data source which will be given the
> username and password once the user logs in. Is this a good approach
> and can you please give any advises on this?
>
> Thank you in advance,
> Josip
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment