Spring-Social is an OAuth authentication framework that supports various social networks. Alfresco uses some Spring-Social modules to integrate with social networks. Spring-Social-Alfresco provides authentication and client APIs to access the Alfresco REST API and CMIS functionality. It allows persisting OAuth tokens and making calls to retrieve networks, sites, users and manage content.
6. Spring-Social Modules
Spring Social 500px
Spring Social App.net
Spring Social BitBucket
Spring Social Digg
Spring Social Dropbox
Spring Social Flattr
Spring Social Flickr
Spring Social Foursquare
Spring Social GeekList
Spring Social Google
Spring Social Instagram
7. Spring-Social Modules
Spring Social Intuit (Quickbooks Online)
Spring Social Last.fm
Spring Social Live (Windows Live)
Spring Social Miso
Spring Social Mixcloud
Spring Social Nk
Spring Social Salesforce
Spring Social SoundCloud
Spring Social Tumblr
Spring Social Viadeo
Spring Social Vkontakte
Spring Social Weibo
16. Spring-Social-Alfresco
A project that provides Authentication and Client
API to the Alfresco Public API (JSON and CMIS)
CMIS 1.0 Support
JSON REST API
--Site Membership
--Network/Site
--Tags
--Comments
17. Spring-Social-Alfresco
A project that provides Authentication and Client
API to the Alfresco Public API (JSON and CMIS)
CMIS 1.0 Support
JSON REST API
--Site Membership
--Network/Site
--Tags
--Comments
18. How To
AlfrescoConnectionFactory connectionFactory = new
AlfrescoConnectionFactory(consumerKey, consumerSecret);
OAuth2Parameters parameters = new OAuth2Parameters();
parameters.setRedirectUri("http://localhost:8080/alfoauthsample/mycall
back.html");
parameters.setScope(Alfresco.DEFAULT_SCOPE);
parameters.setState("test");
19. How To
String authUrl =
connectionFactory.getOAuthOperations().buildAuthenticateUrl(GrantTyp
e.AUTHORIZATION_CODE, parameters);
//Do the dance here …
AccessGrant accessGrant =
connectionFactory.getOAuthOperations().exchangeForAccess(accessTo
ken, redirectUri, null);
//Persist your tokens here …
20. How To
Connection<Alfresco> connection =
connectionFactory.createConnection(accessGrant);
Alfresco alfresco = connection.getApi();
//Use Alfresco public REST API here
Network homeNetwork = alfresco.getHomeNetwork();
Person currentUser = alfresco.getCurrentUser();
Member member =
alfresco.addMember(network, site, memberId, Role.SiteConsumer);
21. How To
//Get CMIS Session
Session session = alfresco.getCMISSession(network);
ItemIterable<QueryResult> paginatedResults =
session.query(SITES_QUERY, false, paginateContext).skipTo(count).ge
tPage();
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document");
properties.put(PropertyIds.NAME, document.getName());
parent.createDocument(properties, document.getContentStream(), Vers
ioningState.MAJOR);
22. How To
//Get CMIS Session
Session session = alfresco.getCMISSession(network);
ItemIterable<QueryResult> paginatedResults =
session.query(SITES_QUERY, false, paginateContext).skipTo(count).ge
tPage();
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document");
properties.put(PropertyIds.NAME, document.getName());
parent.createDocument(properties, document.getContentStream(), Vers
ioningState.MAJOR);
23. No better than setUp() and tearDown()?
• Fundamentally different.Thank you!
http://www.springsource.org/spring-social
https://github.com/Alfresco/spring-social-alfresco
jared.ottley@alfresco.com
twitter: @jottley
24. No better than setUp() and tearDown()?
• Fundamentally different.Thank you!
http://www.springsource.org/spring-social
https://github.com/Alfresco/spring-social-alfresco
jared.ottley@alfresco.com
twitter: @jottley