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: Config option to disable auto generate routing #230

Open
gbourant opened this issue Jun 30, 2024 · 4 comments
Open

Feature: Config option to disable auto generate routing #230

gbourant opened this issue Jun 30, 2024 · 4 comments

Comments

@gbourant
Copy link
Contributor

At the moment Renarde (RenardeProcessor#collectControllers) generates routes for all non private methods of a given Controller.

The thing is, you could expose sensitive data, if you forget to define the method as private.

@FroMage
Copy link
Contributor

FroMage commented Jul 1, 2024

If you make the method public then it's exposed, that's the contract. There's no point in making public methods in a controller other than to expose them, so I'm not sure this is an issue.

@mattgreen
Copy link

FWIW, I bumped into this at one point: I wanted to implement RenardeOidcHandler in a Controller that had other auth-related concerns, as RenardeOidcHandler behaves similarly to a Controller sans routing.

Would have been nice to be able to hide the methods with an annotation. Maybe wait and see if other people have other use cases that are blocked by the inability to hide public methods from routing?

@FroMage
Copy link
Contributor

FroMage commented Sep 9, 2024

Yeah, RenardeOidcHandler is special, and not something that can be implemented in a Controller. Perhaps I should make it an explicit error if you try that?

@mattgreen
Copy link

Seems reasonable! A mention in the docs would also be sufficient.

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

3 participants