com.google.api.client.auth.oauth.OAuthGetTemporaryToken

Here are the examples of the java api class com.google.api.client.auth.oauth.OAuthGetTemporaryToken taken from open source projects.

1. AuthorizationFlow#new10aTemporaryTokenRequest()

Project: android-oauth-client
File: AuthorizationFlow.java
/**
     * Returns the response of a Request Token request as defined in <a
     * href="http://oauth.net/core/1.0a/#auth_step1">Obtaining an Unauthorized
     * Request Token</a>.
     * 
     * @param redirectUri the {@code oauth_callback} as defined in <a
     *            href="http://oauth.net/core/1.0a/#rfc.section.6.1.1">Consumer
     *            Obtains a Request Token</a>
     * @return
     * @throws IOException
     */
public OAuthCredentialsResponse new10aTemporaryTokenRequest(String redirectUri) throws IOException {
    OAuthGetTemporaryToken temporaryToken = new OAuthGetTemporaryToken(getTemporaryTokenRequestUrl());
    OAuthHmacSigner signer = new OAuthHmacSigner();
    ClientParametersAuthentication clientAuthentication = (ClientParametersAuthentication) getClientAuthentication();
    signer.clientSharedSecret = clientAuthentication.getClientSecret();
    temporaryToken.signer = signer;
    temporaryToken.consumerKey = clientAuthentication.getClientId();
    temporaryToken.callback = redirectUri;
    temporaryToken.transport = getTransport();
    return temporaryToken.execute();
}