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

Feature request: specify proc/lambda for request filter? #9

Open
fj opened this issue Apr 21, 2011 · 0 comments
Open

Feature request: specify proc/lambda for request filter? #9

fj opened this issue Apr 21, 2011 · 0 comments

Comments

@fj
Copy link

fj commented Apr 21, 2011

The current implementation allows for the path configuration option to be a string; this string is then checked to see if the request path is prefixed by this string, and if not, the request is ignored.

Instead of that, what if there was a handler configuration option which accepted a block and was passed the request? If the result of evaluating the block is true, the resource for this request is considered protected; otherwise, it isn't. The default implementation of handler is to check whether the request is under the protected path or not.

This would allow for protection of resources in a manner other than only one path (e.g. if the resource is under any one of a discrete set of paths, or if you're asking for a particular form of a resource, or if your request is to transmit a normally encrypted resource in an unencrypted manner, etc.).

mattrw89 referenced this issue in mattrw89/rack-oauth2-server May 17, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant