private SFRestRequest BuildAuthenticatorRestRequest() { var fedUrl = session.BuildUri(RestPath.SF_AUTHENTICATOR_REQUEST_PATH); var data = new AuthenticatorRequestData() { AccountName = session.properties[SFSessionProperty.ACCOUNT], Authenticator = oktaUrl.ToString(), }; int connectionTimeoutSec = int.Parse(session.properties[SFSessionProperty.CONNECTION_TIMEOUT]); return(session.BuildTimeoutRestRequest(fedUrl, new AuthenticatorRequest() { Data = data })); }
/// <summary> /// Builds a simple login request. Each authenticator will fill the Data part with their /// specialized information. The common Data attributes are already filled (clientAppId, /// ClienAppVersion...). /// </summary> /// <returns>A login request to send to the server.</returns> private SFRestRequest BuildLoginRequest() { // build uri var loginUrl = session.BuildLoginUrl(); LoginRequestData data = new LoginRequestData() { loginName = session.properties[SFSessionProperty.USER], accountName = session.properties[SFSessionProperty.ACCOUNT], clientAppId = SFEnvironment.DriverName, clientAppVersion = SFEnvironment.DriverVersion, clientEnv = SFEnvironment.ClientEnv, SessionParameters = session.ParameterMap, Authenticator = authName, }; SetSpecializedAuthenticatorData(ref data); int connectionTimeoutSec = int.Parse(session.properties[SFSessionProperty.CONNECTION_TIMEOUT]); return(session.BuildTimeoutRestRequest(loginUrl, new LoginRequest() { data = data })); }
private SFRestRequest BuildLoginRequest() { // build uri var loginUrl = session.BuildLoginUrl(); LoginRequestData data = new LoginRequestData() { loginName = session.properties[SFSessionProperty.USER], password = session.properties[SFSessionProperty.PASSWORD], accountName = session.properties[SFSessionProperty.ACCOUNT], clientAppId = ".NET", clientAppVersion = SFEnvironment.Version, clientEnv = SFEnvironment.ClientEnv, }; int connectionTimeoutSec = int.Parse(session.properties[SFSessionProperty.CONNECTION_TIMEOUT]); return(session.BuildTimeoutRestRequest(loginUrl, new LoginRequest() { data = data })); }