com.force.sdk.oauth.connector
Class TokenRetrievalServiceImpl

java.lang.Object
  extended by com.force.sdk.oauth.connector.TokenRetrievalServiceImpl
All Implemented Interfaces:
TokenRetrievalService

public class TokenRetrievalServiceImpl
extends Object
implements TokenRetrievalService

Retrieve the auth token by calling the token request URL.

Author:
John Simone

Constructor Summary
TokenRetrievalServiceImpl()
           
 
Method Summary
 String retrieveToken(String hostAndPort, String params, String refreshToken, ForceOAuthConnectionInfo connInfo)
          Obtain an access token by calling the OAuth authentication endpoint and either trading an access code or refresh token for it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenRetrievalServiceImpl

public TokenRetrievalServiceImpl()
Method Detail

retrieveToken

public String retrieveToken(String hostAndPort,
                            String params,
                            String refreshToken,
                            ForceOAuthConnectionInfo connInfo)
                     throws IOException
Obtain an access token by calling the OAuth authentication endpoint and either trading an access code or refresh token for it. Obtain an access token by calling the OAuth authentication endpoint and either trading an access code or refresh token for it.

Specified by:
retrieveToken in interface TokenRetrievalService
Parameters:
hostAndPort - the post and port to call
params - - the parameters for the token request
refreshToken - - The refresh token (optional)
connInfo - - A ForceOAuthConnectionInfo object
Returns:
The response from the token request
Throws:
IOException - if there is a problem retrieving the token


Copyright © 2011. All Rights Reserved.