本文整理了Java中org.scribe.model.Token.getSecret()
方法的一些代码示例,展示了Token.getSecret()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Token.getSecret()
方法的具体详情如下:
包路径:org.scribe.model.Token
类名称:Token
方法名:getSecret
暂无
代码示例来源:origin: org.jboss.seam.social/seam-social
public String getSecret() {
return delegate.getSecret();
}
代码示例来源:origin: stackoverflow.com
Token accessToken = service.getAccessToken(flickReq, v); // Original accessToken you get from Flickr and users entered code.
String tokenSecret = accessToken.getSecret();
代码示例来源:origin: boncey/Flickr4Java
/**
* Returns the credentials attached to an OAuth authentication token.
*
* @param accessToken
* The authentication token
* @return The Auth object
* @throws FlickrException
*/
public Auth checkToken(Token accessToken) throws FlickrException {
return checkToken(accessToken.getToken(), accessToken.getSecret());
}
代码示例来源:origin: com.atlassian.jira.plugins/bitbucket-client
private String getSignature(OAuthRequest request, Token token) {
config.log("generating signature...");
String baseString = api.getBaseStringExtractor().extract(request);
String signature = api.getSignatureService().getSignature(baseString, config.getApiSecret(), token.getSecret());
config.log("base string is: " + baseString);
config.log("signature is: " + signature);
return signature;
}
代码示例来源:origin: com.atlassian.jira.plugins/bitbucket-client
private String getSignature(OAuthRequest request, Token token) {
config.log("generating signature...");
String baseString = api.getBaseStringExtractor().extract(request);
String signature = api.getSignatureService().getSignature(baseString, config.getApiSecret(), token.getSecret());
config.log("base string is: " + baseString);
config.log("signature is: " + signature);
return signature;
}
代码示例来源:origin: org.scribe/scribe-up
private String getSignature(final OAuthRequest request, final Token token) {
this.config.log("generating signature...");
final String baseString = this.api.getBaseStringExtractor().extract(request);
final String signature = this.api.getSignatureService().getSignature(baseString, this.config.getApiSecret(),
token.getSecret());
this.config.log("base string is: " + baseString);
this.config.log("signature is: " + signature);
return signature;
}
代码示例来源:origin: org.scribe/scribe
private String getSignature(OAuthRequest request, Token token)
{
config.log("generating signature...");
config.log("using base64 encoder: " + Base64Encoder.type());
String baseString = api.getBaseStringExtractor().extract(request);
String signature = api.getSignatureService().getSignature(baseString, config.getApiSecret(), token.getSecret());
config.log("base string is: " + baseString);
config.log("signature is: " + signature);
return signature;
}
代码示例来源:origin: de.esoco/esoco-oauth
/***************************************
* {@inheritDoc}
*/
@Override
public String processCallback(String sCallbackCode) throws Exception
{
Verifier aVerifier = new Verifier(sCallbackCode);
Entity rUser = getUser();
Token rToken =
aOAuthService.getAccessToken(getRequestToken(aOAuthService),
aVerifier);
String sAccessToken = rToken.getToken();
String sRefreshToken = rToken.getSecret();
rUser.set(getAccessTokenRelationType(), sAccessToken);
if (sRefreshToken.isEmpty())
{
sRefreshToken = null;
}
Configuration rSettings = Configuration.getSettings(rUser, true);
rSettings.setExtraAttribute(getRefreshTokenExtraAttribute(),
sRefreshToken);
EntityManager.storeEntity(rSettings, rUser);
return sAccessToken;
}
代码示例来源:origin: org.scribe/scribe-up
public void testOk() {
Map<String, String[]> parameters = new HashMap<String, String[]>();
String[] verifiers = new String[] {
VERIFIER
};
String[] tokens = new String[] {
TOKEN
};
parameters.put(BaseOAuth10Provider.OAUTH_VERIFIER, verifiers);
parameters.put(BaseOAuth10Provider.OAUTH_TOKEN, tokens);
SingleUserSession singleUserSession = new SingleUserSession();
singleUserSession.setAttribute(getProvider().getType() + "#" + BaseOAuth10Provider.REQUEST_TOKEN,
new Token(TOKEN, SECRET));
OAuthCredential oauthCredential = getProvider().getCredential(singleUserSession, parameters);
assertNotNull(oauthCredential);
assertEquals(TOKEN, oauthCredential.getToken());
assertEquals(VERIFIER, oauthCredential.getVerifier());
Token tokenRequest = oauthCredential.getRequestToken();
assertEquals(TOKEN, tokenRequest.getToken());
assertEquals(SECRET, tokenRequest.getSecret());
}
代码示例来源:origin: hoverruan/weiboclient4j
} else if (api.getGrantType() == GrantType.Password && requestToken != null) {
request.addBodyParameter(USERNAME, requestToken.getToken());
request.addBodyParameter(PASSWORD, requestToken.getSecret());
代码示例来源:origin: org.scribe/scribe-up
public void testOAuthCredential() {
OAuthCredential credential = new OAuthCredential(REQUEST_TOKEN, TOKEN, VERIFIER, TYPE);
assertEquals(TOKEN, credential.getToken());
assertEquals(VERIFIER, credential.getVerifier());
assertEquals(TYPE, credential.getProviderType());
Token requestToken = credential.getRequestToken();
assertEquals(TOKEN, requestToken.getToken());
assertEquals(SECRET, requestToken.getSecret());
// test serialization
byte[] bytes = CommonHelper.serialize(credential);
OAuthCredential credential2 = (OAuthCredential) CommonHelper.unserialize(bytes);
assertEquals(credential.getRequestToken().toString(), credential2.getRequestToken().toString());
assertEquals(credential.getToken(), credential2.getToken());
assertEquals(credential.getVerifier(), credential2.getVerifier());
assertEquals(credential.getProviderType(), credential2.getProviderType());
}
}
内容来源于网络,如有侵权,请联系作者删除!