本文整理匯總了Java中org.scribe.model.Token.getSecret方法的典型用法代碼示例。如果您正苦於以下問題:Java Token.getSecret方法的具體用法?Java Token.getSecret怎麽用?Java Token.getSecret使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.scribe.model.Token
的用法示例。
在下文中一共展示了Token.getSecret方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getAccessToken
import org.scribe.model.Token; //導入方法依賴的package包/類
@Override
public OAuthToken getAccessToken(OAuthVerifier rv) {
Verifier vi = new Verifier(rv.getValue());
Token to = service.getAccessToken(null, vi);
OAuthToken result = new OAuthToken(to.getToken(), to.getSecret(), to.getRawResponse());
return result;
}
示例2: getAccessToken
import org.scribe.model.Token; //導入方法依賴的package包/類
@Override
public OAuthToken getAccessToken(OAuthVerifier rv) {
Verifier vi = new Verifier(rv.getValue());
Token to = service.getAccessToken(null, vi);
OAuthToken result = new OAuthToken(to.getToken(), to.getSecret(), to.getRawResponse());
return result;
}
示例3: generateAccessTokenString
import org.scribe.model.Token; //導入方法依賴的package包/類
public static String generateAccessTokenString(Token accessTokenObj)
{
return accessTokenObj.getToken() + "&" + accessTokenObj.getSecret();
}
示例4: getAccessToken
import org.scribe.model.Token; //導入方法依賴的package包/類
@Override
public OAuthToken getAccessToken(OAuthVerifier rv) {
Verifier vi = new Verifier(rv.getValue());
Token to = service.getAccessToken(null, vi);
return new OAuthToken(to.getToken(), to.getSecret(), to.getRawResponse());
}
示例5: getAccessToken
import org.scribe.model.Token; //導入方法依賴的package包/類
@Override
public OAuthToken getAccessToken(OAuthVerifier rv) {
Verifier vi = new Verifier(rv.getValue());
Token to = service.getAccessToken(null, vi);
return new OAuthToken(to.getToken(), to.getSecret(), null);
}
示例6: EvernoteAuthToken
import org.scribe.model.Token; //導入方法依賴的package包/類
public EvernoteAuthToken(Token token) {
super(token.getToken(), token.getSecret(), token.getRawResponse());
this.mNoteStoreUrl = extract(getRawResponse(), NOTESTORE_REGEX);
this.mWebApiUrlPrefix = extract(getRawResponse(), WEBAPI_REGEX);
this.mUserId = Integer.parseInt(extract(getRawResponse(), USERID_REGEX));
}
示例7: doInBackground
import org.scribe.model.Token; //導入方法依賴的package包/類
@Override
protected String doInBackground(Void... params) {
String url = null;
try {
EvernoteSession session = EvernoteSession.getOpenSession();
if (session != null) {
//Network request
BootstrapManager.BootstrapInfoWrapper infoWrapper = session.getBootstrapSession().getBootstrapInfo();
if (infoWrapper != null) {
BootstrapInfo info = infoWrapper.getBootstrapInfo();
if (info != null) {
mBootstrapProfiles = (ArrayList<BootstrapProfile>) info.getProfiles();
if (mBootstrapProfiles != null &&
mBootstrapProfiles.size() > 0 &&
mSelectedBootstrapProfilePos < mBootstrapProfiles.size()) {
mSelectedBootstrapProfile = mBootstrapProfiles.get(mSelectedBootstrapProfilePos);
}
}
}
}
if (mSelectedBootstrapProfile == null || TextUtils.isEmpty(mSelectedBootstrapProfile.getSettings().getServiceHost())) {
Log.d(LOGTAG, "Bootstrap did not return a valid host");
return null;
}
OAuthService service = createService();
Log.i(LOGTAG, "Retrieving OAuth request token...");
Token reqToken = service.getRequestToken();
mRequestToken = reqToken.getToken();
mRequestTokenSecret = reqToken.getSecret();
Log.i(LOGTAG, "Redirecting user for authorization...");
url = service.getAuthorizationUrl(reqToken);
if (mSupportAppLinkedNotebooks) {
url += "&supportLinkedSandbox=true";
}
} catch (BootstrapManager.ClientUnsupportedException cue) {
return null;
} catch (Exception ex) {
Log.e(LOGTAG, "Failed to obtain OAuth request token", ex);
}
return url;
}