Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between ConnectController and ProviderSigninController in spring-social?

I am new to spring-social framework and trying to implement the login functionality for my portal using spring-social. I read the documentation but i am still a little confused. Both controllers are used to establish a connection with the service provider? Is there any advantage of using ProviderSigninController over ConnectController or vice versa? What are the advantages?

like image 302
user2138493 Avatar asked Apr 24 '13 04:04

user2138493


1 Answers

The difference is in the results:

  1. After using ConnectController you will have an OAuth2 access token to interact with a provider on behalf of a user.
  2. After using ProviderSigninController you will have the same things + user will be signed into your application using local account (linked to OAuth credentials). If corresponding local account does not exists before this step then it may be created too.

So for example if you want 'Sign in with Twitter' button then ProviderSigninController better fit your needs.

like image 52
Maksym Demidas Avatar answered Jan 03 '23 06:01

Maksym Demidas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!