psecio / invoke

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

define same multipe uri with different method #6

Open praswicaksono opened 9 years ago

praswicaksono commented 9 years ago

for example I have this config

/user/login:
  groups: [Admin]
  methods: [post]
/user/login:
  groups: [Guest]
  methods: [get]

It seem yml loader wont load same key twice, is there any solution?

enygma commented 9 years ago

Hmm, that would take a bit of a rewrite to turn the route keys into sets vs just the single item. It's not overly difficult though - I've done it with an internal project that needed this same kind of setup. You're more than welcome to try to tackle it if you'd like or I can see what I can do eventually.

It would involve making an update around two places:

praswicaksono commented 9 years ago

sorry for late reply, yeah I can handle it myself. Do you want me to submit PR?

enygma commented 9 years ago

No problem - yes, that'd be great!