-
1. Re: AuthenticationService with Spring Framework
mbarkley Aug 3, 2017 11:27 AM (in response to ben.dol)Hi Ben,
By default Errai is meant to discover RPC implementations through CDI. But Errai also has a standalone mechanism for discovering @Service implementations on the classpath. See the notes on service discovery in this section.
As I see it, here are your options:
- Use Errai's standalone service discovery. Your AuthenticationService will have to be default instantiable. If it depends on Spring managed objects, you will need to dynamically look them up.
- If Spring has an SPI, you could write an extension like the one we use for CDI. That CDI extension registers CDI beans that are @Service implementations of RPC interfaces with Errai (which would include AuthenticationService).
(1) is the quicker solution, but if you have other RPC services (or intend to add more) (2) will be more convenient in the long run.
-
2. Re: AuthenticationService with Spring Framework
ruzkant Aug 5, 2017 4:10 PM (in response to ben.dol)I was just busy looking into this myself, and so just posting a link to this forum post, which I haven't tried out for myself, but mean to try somewhere in the next few weeks...
-
3. Re: AuthenticationService with Spring Framework
ruzkant Aug 7, 2017 1:14 AM (in response to ruzkant)Seems the link I posted is quite out of date, not proving useful so far. So I'll be looking into the options mentioned by Max...
-
4. Re: AuthenticationService with Spring Framework
ruzkant Aug 18, 2017 5:02 AM (in response to ben.dol)You can look at this post about a new spring errai github project: github project for errai spring server side integration
It has a sample Errai AuthenticationService that delegates to Spring Security, but I have not used it the otherway around as yet, to try and reuse a Errai AuthenticationService as a spring security implementation.