com.force.sdk.oauth.connector
Class TokenRetrievalServiceImpl
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenRetrievalServiceImpl
public TokenRetrievalServiceImpl()
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 callparams
- - the parameters for the token requestrefreshToken
- - 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.