1. 程式人生 > >SpringSocial相關的知識點

SpringSocial相關的知識點

使用SprigSocial開發第三方登入

核心類

  1. ServiceProvider(AbstractOauth2ServiceProvider):主要負責實現server提供商(例如QQ,微信等共有的東西),預設實現類是AbstractOauth2ServiceProvider

  2. OAuth2Operations(OAuth2Template):主要完成OAuth2的執行流程,1-5步的流程。

  3. Api(AbstractOAuth2ApiBinding):主要是實現對使用者的資訊的獲取,完成第六步。

------------上面主要server相關的------------------------------

  1. Connection(OAuth2Connection):封裝了使用者資訊的類,需要ConnectionFactory生成

  2. ConnectionFactory(OAuth2ConnectionFactory):需要使用到ServiceProvider(1-3步得到的提供者),ApiAdpter:使用3步得到的使用者資訊,因為每個提供商的數結構都不一樣。

  3. UserConnectionRepository(JdbcConnectionRepository):完成Coneection的儲存到