vaadin / vaadin-connect

A Vaadin Labs experiment with a secure stateless communication framework
https://vaadin.com/labs/vaadin-connect
Apache License 2.0
18 stars 5 forks source link

Consider allowing overriding of the default VaadinConnectAccessChecker bean #426

Closed campbellbartlett closed 4 years ago

campbellbartlett commented 4 years ago

Would it be possible to consider allowing custom AccessChecker beans to be defined so that a developer could implement their own?

This would be beneficial when using other authentication methods that aren't 0Auth2 or AnonymousAuth (in a project I'm working on, I'm using SocialLogin via auth0.com, which means there is no concept of username / password in the token I'm sending to the backend and the token is authenticated using other mechanisms before reaching the VaadinConnectAccessChecker).

I think it would be as easy as adding: @ConditionalOnMissingBean to the Bean definition for the VaadinConnectAccessChecker in the VaadinConnectControllerConfiguration.java class (line 104).

This way, if a developer wishes to override the default access check behavior they can do so by defining their own Bean that extends the VaadinConnectAccessChecker.

vlukashov commented 4 years ago

Hi @campbellbartlett! Thanks for the suggestion! I think it makes total sense.

Please note that Vaadin Connect features are being integrated into the core of Vaadin framework (with Vaadin 15 as the target release version). As we make these features a part of our core product, there is no plan to keep maintaining this repo separately.

Would it work for you if I move this issue to the https://github.com/vaadin/flow repo so that it gets implemented in Vaadin 15 instead? There is a team actively working on it now, and this feature can be added rather soon to one of the next Vaadin 15 alphas.

If this is news to you, you could check the quick start page for TypeScript views in Vaadin 15 to get some more info on this, and also to try it out.

campbellbartlett commented 4 years ago

Thanks! I had no idea Connect was being integrated into Vaadin 15, I’ll check it out. Go ahead and move this issue to wherever it needs to be.

vlukashov commented 4 years ago

Issue moved to vaadin/flow #7234 via ZenHub