ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / SaaS functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Authenticates a user of a SaaS site beside the SaaS web service that manages the site.
Note When the connection is established with SaaSConnectall sites can be accessed. SaaSCheckService is used to check the access rights.
Example
// Connexion au Webservice en charge du site
IF SaaSConnect(SAI_LOGIN, SAI_PASSWORD) = False THEN
	IF ErrorOccurred = True THEN
		sMessageErreur = CR + ErrorInfo(errFullDetails)
		RETURN sMessageErreur
	ELSE
		RETURN "Connexion au site SaaS refusée."
	END
END

// On passe une syntaxe spécifique (sans paramètres) pour indiquer que l'on teste l'accès au site
// Le client a au moins un abonnement valide à au moins un service du site
IF SaaSCheckService() = False THEN
	IF ErrorOccurred = True THEN
		sMessageErreur = CR + ErrorInfo(errFullDetails)
		RETURN sMessageErreur
	ELSE
		RETURN "Connexion au service SaaS du site refusée."
	END
END

// Utilisation de la connexion à la base HFSQL Client/Serveur ou Classic
// définie dans l'administrateur SaaS sur le serveur, pour les données du site.
IF HChangeConnection("*", SaaSClientConnection()) = False THEN
	sMessageErreur = HErrorInfo(hErrFullDetails)
	RETURN sMessageErreur
END

RETURN "Connexion 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 or Secret string
Password of the SaaS user.
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
<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/WDSAAS300_WEB/WDSaaS300.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 web service 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: wd300com.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help