Spring Social을 제대로 이해하기 위한 레퍼런스
1. OAuth 개념이해
Facebook 인증 그림
http://tungwaiyip.info/blog/2011/02/19/facebook_oauth_authentication_flow
2. OAuth 1,2 적용
OAuth 1을 적용한 twitter, OAuth 2를 적용한 facebook코드의 흐름은 Spring Social 을 쉽게 이해할 수 있게 함
<bean class="org.springframework.social.twitter.connect.TwitterConnectionFactory"]]]]> <constructor-arg value="${twitter.consumerKey}" /> <constructor-arg value="${twitter.consumerSecret}" /> </bean> <bean class="org.springframework.social.facebook.connect.FacebookConnectionFactory"]]]]> <constructor-arg value="${facebook.clientId}" /> // appid <constructor-arg value="${facebook.clientSecret}" />
</bean>
3. Facebook, Twitter 레퍼런스
https://developers.facebook.com/docs/facebook-login/login-flow-for-web-no-jssdk/
access token정보
http://developers.facebook.com/docs/facebook-login/access-tokens/
Graph API Explorer - access token으로 정보 얻어오는 web tool
https://developers.facebook.com/tools/explorer/
refresh token 비슷한 것을 사용하기로 함
https://developers.facebook.com/roadmap/offline-access-removal/
Graph API Explorer - accessToken으로 debug 또는 validation check
https://developers.facebook.com/tools/debug/
https://graph.facebook.com/debug_token?input_token=INPUT_TOKEN&access_token=ACCESS_TOKEN
How-To: Handle expired access tokens
http://developers.facebook.com/blog/post/2011/05/13/how-to--handle-expired-access-tokens/
Login Security
https://developers.facebook.com/docs/facebook-login/security/
oauth 태그 저장된 정보
https://dev.twitter.com/tags/oauth
4. Spring Social 테이블
spring social 의 jdbcUsersConnectionRepository.sql
createtable UserConnection (
userId varchar(255) notnull, // 사용자 아이디
providerId varchar(255) notnull, // facebook, twitter
providerUserId varchar(255), // provier에서 자체적인 정의한 user id
rank intnotnull, // rank는 내부적인 sequence로 보면 됨
displayName varchar(255),
profileUrl varchar(512),
imageUrl varchar(512),
accessToken varchar(255) not null,
secret varchar(255),
refreshToken varchar(255),
expireTime bigint,
primarykey (userId, providerId, providerUserId));
** 참고2
현재 2013.7월 현재 Refresh token not supported for OAuth2(https://jira.springsource.org/browse/SOCIAL-263) 에 따르면, spring social에 계속 넣을지 고민중이다.
5. Spring Social 정보
- spring-social-core – The service provider framework, OAuth support, and core classes.
- spring-social-web – The connect controller and supporting types.
- spring-social-facebook – A service provider implementation for connecting with Facebook and support for signing into an application via Facebook.
- spring-social-twitter – A service provider implementation for connecting with Twitter and support for signing into an application via Twitter.
- spring-social-linkedin – A service provider implementation for connecting with LinkedIn.
- spring-social-tripit – A service provider implementation for connecting with TripIt.
- spring-social-github – A service provider implementation for connecting with GitHub.
- spring-social-gowalla – A service provider implementation for connecting with Gowalla.
- spring-social-test – Support for testing service provider implementations and API bindings.
spring social source
https://github.com/SpringSource/spring-social
spring social samples
https://github.com/SpringSource/spring-social-samples
spring social twitter source
https://github.com/SpringSource/spring-social-twitter
spring social Facebook source
https://github.com/SpringSource/spring-social-facebook
'Trend' 카테고리의 다른 글
타임스퀘어의 간판을 보고 또 다른 광고를 보여주는 증강현실 어플 (0) | 2011.08.02 |
---|---|
NO SQL 인기 순위 (0) | 2010.04.18 |
오라클 썬 인수 (0) | 2009.04.21 |
이클립스 사용자에 대한 통계 (0) | 2009.04.08 |
티스토리로 이사하기 (0) | 2009.04.01 |