psecio / invoke

Invoke: Route Authentication/Authorization Management
36 stars 3 forks source link

"Cascading" paths #2

Open enygma opened 9 years ago

enygma commented 9 years ago

Currently Invoke only supports exact path matching. The concept of "cascading" paths should be introduced, allowing a developer to say "anything under /admin is protected" by just specifying one entry and a "cascade" option:

/foo/bar/admin
  protected: on
  cascade: on

This would not only protect /foo/bar/admin but also anything under them including things like /foo/bar/admin/file.txt and /foo/bar/admin/user/view/username.

enygma commented 9 years ago

One update on this, I'm of the opinion that, if it hits another match that more specifically matches the requested URI those settings should override not merge with the current ones. This would help to eliminate potential ambiguity in how the settings are being interpreted.