Skip to content

Required to annotate with @authenticate for all the routes! #2460

@vishalvisd

Description

@vishalvisd

Current Behavior

I have to annotate all of my controller routes with @authenticate('startegry_name'), but in my case I just have a single strategy and don't like the compulsion of adding the @autheticate annotation to each of my 20-30 routes. Though, one or two routes are there where I don't need any authentication and should be available for public.

Expected Behavior

Would be better if there is a way to have authentication default for all routes except for one or two. IF there is already some sort of way available please let me know what would be that.

Acceptance criteria

  • if a method is decorated with @authenticate, the method would use the metadata as is without checking the class
  • if a method is not decorated with @authenticate, the method would check the class level
  • introduce @authenticate.skip or @authenticate('skip') to exclude a method to inherit @authenticate from the class
  • update relevant docs in the site

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions