(Strings.isNullOrEmpty(callbackBaseUrl)) ? OUT_OF_BOUNDS_CALLBACK : callbackBaseUrl; OAuthGetTemporaryToken tempTokenRequest = new OAuthGetTemporaryToken(config.getRequestTokenUrl()); tempTokenRequest.callback = callback; tempTokenRequest.transport = httpTransport; tempTokenRequest.signer = config.getRequestTokenSigner(clientSecret); if (config.whenAddScopes() == OAuth1Step.REQUEST_TOKEN) { tempTokenRequest.set(config.getScopeParameterName(), scope); OAuthCredentialsResponse tempTokenResponse = tempTokenRequest.execute(); authData = new TokenSecretAuthData(tempTokenResponse.token, tempTokenResponse.tokenSecret); } catch (IOException e) {
this.authorizationServerUrl = authorizationServerUrl; OAuthGetTemporaryToken temporaryToken = new OAuthGetTemporaryToken(callbackUrl); OAuthHmacSigner signer = new OAuthHmacSigner(); signer.clientSharedSecret = consumerSecret; temporaryToken.transport = this.transport; OAuthCredentialsResponse tempCredentials = temporaryToken.execute();
getTemporaryToken.consumerKey = OAuth2ClientCredentials.CONSUMER_KEY; getTemporaryToken.transport = new NetHttpTransport(); OAuthCredentialsResponse temporaryTokenResponse = getTemporaryToken.execute();
@Override public OAuthParameters createParameters() { OAuthParameters result = super.createParameters(); result.callback = callback; return result; } }
this.authorizationServerUrl = authorizationServerUrl; OAuthGetTemporaryToken temporaryToken = new OAuthGetTemporaryToken(callbackUrl); OAuthHmacSigner signer = new OAuthHmacSigner(); signer.clientSharedSecret = consumerSecret; temporaryToken.transport = this.transport; OAuthCredentialsResponse tempCredentials = temporaryToken.execute();
temporaryToken = new OAuthPostTemporaryToken(requestTokenUri); } else { temporaryToken = new OAuthGetTemporaryToken(requestTokenUri); temporaryToken.callback = callbackUrl.build(); temporaryToken.transport = httpTransport; final OAuthCredentialsResponse credentialsResponse = temporaryToken.execute(); final OAuthAuthorizeTemporaryTokenUrl authorizeTemporaryTokenUrl = new OAuthAuthorizeTemporaryTokenUrl(authorizeTokenUri);