ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / SaaS functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Authenticates a user of a SaaS site beside the SaaS webservice that manages the site.
Remark: Once the connection has been established with SaaSConnect, you can access all the sites. SaaSCheckService is used to check the access rights.
New in version 2024
WINDEVWindows This function is now available for WINDEV applications in Windows.
Example
// Connection to the web service in charge of the site
IF SaaSConnect(EDT_USERNAME, EDT_PASSWORD) = False THEN
IF ErrorOccurred = True THEN
sErrorMessage = CR + ErrorInfo(errFullDetails)
RETURN sErrorMessage
ELSE
RETURN "Connection to SaaS site denied."
END
END

// Pass a specific syntax (without parameter) to specify that we are checking the access to the site
// The client has at least one valid subscription to at least one service of the site
IF SaaSCheckService() = False THEN
IF ErrorOccurred = True THEN
sErrorMessage = CR + ErrorInfo(errFullDetails)
RETURN sErrorMessage
ELSE
RETURN "Connection to the SaaS service of the site denied."
END
END

// Use the connection to the HFSQL Client/Server or Classic database
// defined in the SaaS administrator on the server, for the site data.
IF HChangeConnection("*", SaaSClientConnection()) = False THEN
sErrorMessage = HErrorInfo(hErrFullDetails)
RETURN sErrorMessage
END

RETURN "Connection OK"
Syntax
<Result> = SaaSConnect(<User> , <Password> [, <Web service>])
<Result>: Boolean
  • True if the authentication was successful,
  • False otherwise. To get more details on the error, use ErrorInfo.
<User>: Character string
Connection name of the SaaS user.
<Password>: Character string
Password of the SaaS user.
<Web service>: Optional character string
Web service to use. This parameter corresponds to:
  • the host name of the SaaS web service (for example, "Computer", "Computer.MyNetwork.com", "http://Mydomain.com").
  • the full URL of the SaaS web service (for example, "http://domain.com/WDSAAS290_WEB/WDSaaS290.awws").
By default, the connection will be established to the SaaS web service installed with the WEBDEV Application Server on the local computer.
Remarks
  • If SaaSConnect is run several times, an implicit disconnection is performed every time (SaaSDisconnect).
  • When the connection has been established with SaaSConnect, the SaaS web service periodically tests the validity of the connection by automatically calling SaaSIsConnected every 4 minutes.
  • If the authentication is successful, the next SaaSxx functions will implicitly use the SaaS account specified during the last call to SaaSConnect. The execution context will be closed by SaaSDisconnect.
  • To increase security, we recommend you to use the HTTPS protocol, both to access the page containing the call to SaaSConnect and in the URL of the web service. The server must be configured to accept this protocol.
  • If the Webservice is accessed in HTTPS, the SSL certificate used must not produce any security exception.
  • SaaSChangePassword is used to modify the password of the connected user.
Component: wd290com.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/13/2023

Send a report | Local help