springboot-angular2-tutorial / boot-app

This repository is an example application for Spring Boot and Angular2 tutorial.
MIT License
113 stars 42 forks source link

Authentication #4

Closed rixlabs closed 8 years ago

rixlabs commented 8 years ago

Hi,

this is not a real issue, more a request for infos.

Can you explain in few word how does the login procedure work? Or better why didn't you use a "normal" controller for receiving the auth data?

A you can see I've got problem understanding the StatelessLoginFilter :)

good job anyway lot's of good examples! keep it up

akirasosa commented 8 years ago

@rixlabs It uses Spring Security. So, I have to use filter instead of controller to make user logged in.

I agree with your point. Actually, this app does not use the functionality of Spring Security so much. In this case, it would be better to use simple controller without Spring Security. I can see an example below.

https://github.com/nielsutrecht/jwt-angular-spring

This example does not use Spring Security. It looks simple enough.

rixlabs commented 8 years ago

@akirasosa thanks for the super fast answere! Even with spring security you can use a controller for a stateless authentication. I used this (from Cerberus project)as example in another project and it works well. If you're interested I can branch and refactor that part so there is another example.

akirasosa commented 8 years ago

@rixlabs Thanks for information. I didn't know it...

If you're interested I can branch and refactor that part so there is another example.

Yes. It will be a great improvement. Thanks!

akirasosa commented 8 years ago

Done on #5