Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wildcards #16

Open
LorenzBischof opened this issue Mar 28, 2015 · 4 comments
Open

wildcards #16

LorenzBischof opened this issue Mar 28, 2015 · 4 comments

Comments

@LorenzBischof
Copy link

Hello,

Is it possible to use some form of wildcards when adding and allowing access to resources? Something like addResource('/api/*')?

Thanks

@jeremykendall
Copy link
Owner

@LorenzBI Not at this point, no, although you might be able to use route groups to accomplish the same thing. I haven't experimented with that.

@LorenzBischof
Copy link
Author

@jeremykendall That would be perfect but sadly it doesn't work. It looks for /api/tasks and fails. It's a pain to add all the routes and allow each one.

@jeremykendall
Copy link
Owner

I'll look into it when I get a chance. It would be a really nice addition, I think. If you have any thoughts or suggestions between now and whenever I can get around to this, please let me know.

@jeremykendall
Copy link
Owner

@LorenzBI One option would be to implement your own version of JeremyKendall\Slim\Auth\Middleware\Authorization. You'd simply need to update the $isAuthorized callback to accept wildcards (or whatever you prefer in your custom implementation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants