psecio / invoke

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

Multiple groups per route #7

Open praswicaksono opened 8 years ago

praswicaksono commented 8 years ago

for example I have this config

/show/news:
  groups: [Guest, Member]
  methods: [post]

In those config user will need in Guest AND Member, is this library designed that way? I think it would be better if user can access those route when it in Guest or Member group.

What do you think?

enygma commented 8 years ago

Yeah, that's the tricky part - defining something more complex in the configuration would require a much more verbose structure to it. I'd been working on another library, PropAuth, that makes this easier on the code level but I'm not sure how it would integrate with Invoke and its config.

Yes, the library was designed to be AND checks by default, but I'm definitely open to options for defining other relationships.