def get_with_authorization_code(auth_code, redirect_uri, resource = nil)
      logger.verbose('TokenRequest getting token with authorization code ' \
                     "#{auth_code}, redirect_uri #{redirect_uri} and " \
                     "resource #{resource}.")
      request(CODE => auth_code,
              GRANT_TYPE => GrantType::AUTHORIZATION_CODE,
              REDIRECT_URI => URI.parse(redirect_uri.to_s),
              RESOURCE => resource)
    end
def get_with_authorization_code(auth_code, redirect_uri, resource = nil)
      logger.verbose('TokenRequest getting token with authorization code ' \
                     "#{auth_code}, redirect_uri #{redirect_uri} and " \
                     "resource #{resource}.")
      request(CODE => auth_code,
              GRANT_TYPE => GrantType::AUTHORIZATION_CODE,
              REDIRECT_URI => URI.parse(redirect_uri.to_s),
              RESOURCE => resource)
    end
Gets a token based on a previously acquired authentication code.

 @param String auth_code
   An authentication code that was previously acquired from an
   authentication endpoint.
 @param String redirect_uri
   The redirect uri that was passed to the authentication endpoint when the
   auth code was acquired.
 @optional String resource
   The resource for which the requested access token will provide access.
 @return TokenResponse