本文整理汇总了Java中org.scribe.model.SignatureType类的典型用法代码示例。如果您正苦于以下问题:Java SignatureType类的具体用法?Java SignatureType怎么用?Java SignatureType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SignatureType类属于org.scribe.model包,在下文中一共展示了SignatureType类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBitbucketOAuthScribeService
import org.scribe.model.SignatureType; //导入依赖的package包/类
private OAuthService createBitbucketOAuthScribeService(String callbackUrl)
{
Organization organizationInstance = organizationService.get(Integer.parseInt(organization), false);
ServiceBuilder sb = new ServiceBuilder().apiKey(organizationInstance.getCredential().getOauthKey())
.signatureType(SignatureType.Header).apiSecret(organizationInstance.getCredential().getOauthSecret())
.provider(new Bitbucket10aScribeApi(organizationInstance.getHostUrl(), httpClientProvider))
.debugStream(new DebugOutputStream(log));
if (!StringUtils.isBlank(callbackUrl))
{
sb.callback(callbackUrl);
}
return sb.build();
}
示例2: authorize
import org.scribe.model.SignatureType; //导入依赖的package包/类
private Token authorize() {
OAuthService service = new ServiceBuilder()
.provider(CubeSensorsAuthApi.class)
.apiKey(CubeSensorsProperties.getAppKey())
.apiSecret(CubeSensorsProperties.getAppSecret())
.signatureType(SignatureType.QueryString).build();
Token requestToken = service.getRequestToken();
String authorizationUrl = service.getAuthorizationUrl(requestToken);
String authorization = authProvider.getAuthorization(authorizationUrl);
Token accessToken = service.getAccessToken(requestToken, new Verifier(
authorization));
return accessToken;
}
示例3: createBitbucketOAuthScribeService
import org.scribe.model.SignatureType; //导入依赖的package包/类
private OAuthService createBitbucketOAuthScribeService(String callbackUrl)
{
ServiceBuilder sb = new ServiceBuilder().apiKey(oAuthStore.getClientId(Host.BITBUCKET.id))
.signatureType(SignatureType.Header)
.apiSecret(oAuthStore.getSecret(Host.BITBUCKET.id))
.provider(new Bitbucket10aScribeApi(url, httpClientProvider))
.debugStream(new DebugOutputStream(log));
if (!StringUtils.isBlank(callbackUrl))
{
sb.callback(callbackUrl);
}
return sb.build();
}
示例4: internalInit
import org.scribe.model.SignatureType; //导入依赖的package包/类
@Override
protected void internalInit() {
super.internalInit();
this.api20 = new TencentApi();
String theScope = StringUtils.isNotBlank(this.scope) ? this.scope : null;
final OAuthConfig conf = new OAuthConfig(this.key, this.secret,
this.callbackUrl, SignatureType.Header, theScope, null);
this.service = new TencentOAuth20ServiceImpl(this.api20, conf);
}
示例5: buildService
import org.scribe.model.SignatureType; //导入依赖的package包/类
@BeforeClass
public static void buildService() {
service = new ServiceBuilder().debugStream(System.out)
.provider(CubeSensorsAuthApi.class)
.apiKey(CubeSensorsProperties.getAppKey())
.apiSecret(CubeSensorsProperties.getAppSecret())
.callback(CubeSensorsProperties.getAppCallbackUrl())
.signatureType(SignatureType.QueryString)
.build();
}
示例6: internalInit
import org.scribe.model.SignatureType; //导入依赖的package包/类
@Override
protected void internalInit() {
super.internalInit();
this.scopeValue = "";
this.service = new ProxyOAuthFIWARE(new FIWAREApi(this.serverURL),
new OAuthConfig(this.key, this.secret,
this.callbackUrl,
SignatureType.Header,
this.scopeValue, null),
this.connectTimeout, this.readTimeout, this.proxyHost,
this.proxyPort, false, true);
}
示例7: internalInit
import org.scribe.model.SignatureType; //导入依赖的package包/类
@Override
protected void internalInit() {
super.internalInit();
this.scopeValue = "";
this.service = new ProxyOAuthFIWARE(new FIWAREApi(this.serverURL),
new OAuthConfig(this.key, this.secret,
this.callbackUrl,
SignatureType.Header,
this.scopeValue, null),
this.connectTimeout, this.readTimeout, this.proxyHost,
this.proxyPort, false, true);
}
示例8: internalInit
import org.scribe.model.SignatureType; //导入依赖的package包/类
@Override
protected void internalInit() {
super.internalInit();
this.scopeValue = "";
this.service = new ProxyOAuthFIWARE(new FIWAREApi(this.serverURL),
new OAuthConfig(this.key, this.secret,
this.callbackUrl,
SignatureType.Header,
this.scopeValue, null),
this.connectTimeout, this.readTimeout, this.proxyHost,
this.proxyPort, false, true);
}
示例9: internalInit
import org.scribe.model.SignatureType; //导入依赖的package包/类
protected void internalInit() {
super.internalInit();
String url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_userinfo&state=WeiXinClientOauth#wechat_redirect";
WeiXinApi20 api = new WeiXinApi20(url);
this.service = new WeiXinOAuth20ServiceImpl(api, new OAuthConfig(this.key, this.secret, this.callbackUrl, SignatureType.Header, null, null),
this.connectTimeout, this.readTimeout, this.proxyHost, this.proxyPort); }
示例10: internalInit
import org.scribe.model.SignatureType; //导入依赖的package包/类
protected void internalInit() {
super.internalInit();
//String url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_userinfo#wechat_redirect";
WeiXinApi20 api = new WeiXinApi20();
this.service = new WeiXinOAuth20ServiceImpl(api, new OAuthConfig(this.key, this.secret, this.callbackUrl, SignatureType.Header, null, null),
this.connectTimeout, this.readTimeout, this.proxyHost, this.proxyPort); }
示例11: createOauthService
import org.scribe.model.SignatureType; //导入依赖的package包/类
protected OAuthService createOauthService()
{
return new ServiceBuilder().provider(new OAuthBitbucket10aApi(apiProvider.getApiUrl(), isTwoLegged())).apiKey(key)
.signatureType(SignatureType.Header).apiSecret(secret).debugStream(new DebugOutputStream(log)).build();
}
示例12: debug
import org.scribe.model.SignatureType; //导入依赖的package包/类
/**
* Rebuilds the {@code service} object with debug turned on (defaulted to {@code System.out})
*/
public static void debug() {
service = new ServiceBuilder().debug().provider(CubeSensorsAuthApi.class).apiKey(CubeSensorsProperties.getAppKey())
.apiSecret(CubeSensorsProperties.getAppSecret()).signatureType(SignatureType.QueryString).build();
}
示例13: asConfig
import org.scribe.model.SignatureType; //导入依赖的package包/类
synchronized public OAuthConfig asConfig() {
String injected = getInjecter().injectIdToCallback(callback, getId());
return new OAuthConfig(apiKey, apiSecret, injected, SignatureType.Header, scope, null);
}