Search in sources :

Example 1 with MediaWikiApi

use of com.github.scribejava.apis.MediaWikiApi in project wikidata-query-rdf by wikimedia.

the class OAuthProxyService method init.

@PostConstruct
public void init() {
    OAuthProxyConfig oauthConfig = new OAuthProxyConfig(servletConfig);
    OAuth10aService oauthService = new ServiceBuilder(oauthConfig.consumerKey()).apiSecret(oauthConfig.consumerSecret()).build(new MediaWikiApi(oauthConfig.indexUrl(), oauthConfig.niceUrlBase()));
    KaskSessionStore<SessionState> sessionStore = buildSessionStore(oauthConfig, HttpClients.createDefault());
    OAuthIdentifyService identify = new OAuthIdentifyService(oauthService, oauthConfig.indexUrl(), oauthConfig.consumerSecret());
    init(oauthConfig, oauthService, identify, sessionStore);
}
Also used : MediaWikiApi(com.github.scribejava.apis.MediaWikiApi) OAuth10aService(com.github.scribejava.core.oauth.OAuth10aService) ServiceBuilder(com.github.scribejava.core.builder.ServiceBuilder) PostConstruct(javax.annotation.PostConstruct)

Aggregations

MediaWikiApi (com.github.scribejava.apis.MediaWikiApi)1 ServiceBuilder (com.github.scribejava.core.builder.ServiceBuilder)1 OAuth10aService (com.github.scribejava.core.oauth.OAuth10aService)1 PostConstruct (javax.annotation.PostConstruct)1