gabrielruiu / spring-social-yahoo Goto Github PK
View Code? Open in Web Editor NEWSpring Social Yahoo is an extension based on Spring Social that provides funcationality to communicate with the Yahoo Social Rest API.
License: Other
Spring Social Yahoo is an extension based on Spring Social that provides funcationality to communicate with the Yahoo Social Rest API.
License: Other
I'm trying to implement YahooAutoConfiguration
like for example org.springframework.boot.autoconfigure.social.TwitterAutoConfiguration
:
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.social.config.annotation.EnableSocial;
import org.springframework.social.config.annotation.SocialConfigurerAdapter;
import org.springframework.social.connect.Connection;
import org.springframework.social.connect.ConnectionFactory;
import org.springframework.social.connect.ConnectionRepository;
import org.springframework.social.connect.web.GenericConnectionStatusView;
import org.springframework.social.oauth2.OAuth2Template;
import org.springframework.web.servlet.View;
import com.github.gabrielruiu.springsocial.yahoo.api.Yahoo;
import com.github.gabrielruiu.springsocial.yahoo.api.impl.YahooTemplate;
import com.github.gabrielruiu.springsocial.yahoo.connect.YahooConnectionFactory;
/**
* {@link EnableAutoConfiguration Auto-configuration} for Spring Social
* connectivity with Yahoo.
*
*/
@Configuration
@ConditionalOnClass({ SocialConfigurerAdapter.class, YahooConnectionFactory.class })
@ConditionalOnProperty(prefix = "spring.social.yahoo.", value = "app-id")
@AutoConfigureBefore(SocialWebAutoConfiguration.class)
@AutoConfigureAfter(WebMvcAutoConfiguration.class)
public class YahooAutoConfiguration {
@Configuration
@EnableSocial
@EnableConfigurationProperties(YahooProperties.class)
@ConditionalOnWebApplication
protected static class YahooAutoConfigurationAdapter extends SocialAutoConfigurerAdapter {
@Autowired
private YahooProperties properties;
@Bean
@ConditionalOnMissingBean(Yahoo.class)
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public Yahoo yahoo(ConnectionRepository repository) {
Connection<Yahoo> connection = repository.findPrimaryConnection(Yahoo.class);
if (connection != null) {
return connection.getApi();
}
return connection != null ? connection.getApi() : new YahooTemplate(this.properties.getAppId(),
this.properties.getAppSecret(), ???????);
}
@Bean(name = { "connect/yahooConnect", "connect/yahooConnected" })
@ConditionalOnProperty(prefix = "spring.social.", value = "auto-connection-views")
public View yahooConnectView() {
return new GenericConnectionStatusView("yahoo", "Yahoo");
}
@Override
protected ConnectionFactory<?> createConnectionFactory() {
YahooConnectionFactory factory = new YahooConnectionFactory(this.properties.getAppId(), this.properties.getAppSecret());
return factory;
}
}
}
and right now I don't know where to get
String accessToken, String accessTokenSecret, String guid
for YahooTemplate. I have only this.properties.getAppId()
and this.properties.getAppSecret()
It was enough for example for Google and GitHub OAuth providers. Why do I need to provide String accessToken, String accessTokenSecret, String guid
parameters here ?
Hello,
I'd like to include spring-social-yahoo into my project. Do you have a Maven reository for spring-social-yahoo ?
Thanks
It's strange the lack of activity on Yahoo with Spring Social from the open source community. I wanted to ask if this project is still alive, if you accept PR and if you plan to make new releases on Maven central. I saw some functionalities are incomplete.
Thanks and nice work so far!
Why isn't the most basic operations implemented for it that includes the user profile info obtained by connection.fetchUserProfile(). I assume that would be the matter of implementing YahooAdapter.
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.