-
Notifications
You must be signed in to change notification settings - Fork 164
Use BjyAuthorize with restful webservice #55
Comments
In order to do this, you would want to implement your own view strategy that does not render an HTML error page. The class in question is in UnauthorizedStrategy.php (modifying lines 132-140 will probably get you what you need). When you create your own view strategy, you can modify the config to use yours instead of the default. See here. |
Thanks for your quick answer, I will try to implement it too see if I come up with anything :) |
I've tried to change the ViewModel but it seems that it still returns the application layout html in the response. |
This is supported on controller routes now if you use the HTTP method as |
@rhacker news on this one? |
@Ocramius Actually, I don't have much time atm so I've tried to implement something on my own and it goes well. But I will look into this plugin later to implement the acl :) |
Closing then, since this was implemented in master |
If using the
I'm not so sure at the moment how to implement this using BjyAuthorize. Should I use both |
@localheinz good point. I didn't think about this use case, and that's mainly because I have different controllers for I guess it is a limitation for now. |
Actually, that's not even that bad an idea! Thanks. It may seem like a workaround and it may even duplicate some code in the factory layer (because a collection controller might have similar dependencies), but it actually fits the single responsibility principle. |
When i try to get access by POST method i catch an forbidden 403 error. How to fix this? |
@fiWhy unrelated. |
I'm sorry. Wrong question. I'm trying to use module with rest api's methods. In case of using get or getList I have access, but when try to send data I catch a forbidden response. Correctly I asked create and update methods. |
@fiWhy open a new issue with more detailed information to reproduce this, please :-\ |
I'm finding a way to use this plugin with restful webservice but still don't know how. When I activate the plugin, the route configuration for restful webservice doesn't work anymore. I request the url, it returns html instead.
Looking forward to your reply @bjyoungblood
The text was updated successfully, but these errors were encountered: