Closed rixlabs closed 8 years ago
@rixlabs It looks really nice refactoring. 👍 Please let me write a few comments for more improvements.
Need access to my repo or you merge first?
About defining the bean in another class it could be good looking from encapsulation side but it would create another file for the security configuration that is used only in SecurityConfig class. So it's good for separating concerns but add another file to the config. For me it can stay inside SecurityConfig but is up to you.
For the method addAuthentication of TokenAuthenticationService I will delete it
I commited the change but I forgotted to clean the imports.
I'm doing also that part now
@rixlabs Great. Merged. Thanks!
I found a bad BUG about the authenticationManager!!!!
I'll fixit and send another commit.
I'm sorry forgot to test with anonymous
Let's open the pull request. :)
As you can see I created a controller that manage the authentication part.
The functionality is the same but I find it more readable.
In the SecurityConfig the creation of the bean is also for readability.
Let me know what do you think.