ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Web-specific functions / Miscellaneous WEBDEV functions
  • Authentication mode
  • Pre-launched sessions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
CertificateClientInfo (Function)
In french: CertificatClientInfo
Returns information about the certificate used by the client computer during a Web connection with authentication by certificate.
Example
// Vérifie si le certificat est présent et valide
IF DoitEtreAuthentifié = True THEN
	IF CertificateClientInfo(certificateClientPresent) = False 
		OR CertificateClientInfo(certificateClientValid) = False THEN
		// Erreur
		...
		RETURN
	END
	// Vérification des droits de l'utilisateur
	...
END
// Affiche dans un champ de saisie 
// le numéro de série du certificat client utilisé 
SAI_NumSérie = CertificateClientInfo(certificateClientSerialNumber)

// Récupère le pays du certificat client utilisé 
SAI_CertificatClientPays_Objet = CertificateClientInfo(certificateClientSubject, certificateClientCountry)
Syntax
<Result> = CertificateClientInfo(<Information> [, <Sub-information>])
<Result>: Variant
Requested information.
<Information>: Integer constant
Requested informatioin about the client certificate:
certificateClientIssuerIdentification of certificate issuer. You have the ability to extract part of the information by using the <Sub-information> parameter.
Example of string returned: CERT_ISSUER=C=FR,S=NA,L=MONTPELLIER, O=PCSOFTQUAL,CN=caqual,E=qual@pcsoft1.fr
certificateClientPresentIndicates whether a certificate was transmitted by the client computer (True) or not (False).
certificateClientSerialNumberSerial number of certificate (hexadecimal string). Example: "00E48E2E3503C8317A"
certificateClientSubjectIdentification of certificate. You have the ability to extract part of the information by using the <Sub-information> parameter.
Example of string returned: CERT_SUBJECT=C=FR,S=NA,L=MONTPELLIER, O=PCSOFTQUAL,CN=twr4m.pcsoft.com,E=qual@pcsoft1.fr
certificateClientValidIndicates whether a client certificate is validated by the server (True) or not (False).
<Sub-information>: Optional Integer constant
Allows you to extract a specific information (used with the certificateClientIssuer and certificateClientSubject constants only). The full information is not always available.
The following constants are accepted:
certificateClientCommonNameUsual name.
certificateClientCountryCountry associated with the certificate.
certificateClientDistinguishedName
(Default value)
Entire list of certificate characteristics. The returned value is a string whose components are separated by a comma. For example SSL_CLIENT_I_DN=,C=FR,ST=NA,L=MONTPELLIER, O=PCSOFTQUAL,CN=caqual,emailAddress=qual@pcsoft1.fr
The following constants are used to retrieve a single information.
certificateClientEmailEmail address.
certificateClientLocalityLocality associated with the certificate.
certificateClientOrganizationCompany.
certificateClientOrganizationalUnitService name.
certificateClientStateState where the certificate was created.
certificateClientUserIDUser identifier.
Remarks

Authentication mode

There are two modes to authenticate clients to the web server:
  • authentication by the Web server. In most cases, this type of authentication is based on the authentication as domain user or server user.
  • authentication by certificate. In this case, the following checks are performed:
    • Checking the presence of a certificate.
    • Checking the validity of the certificate.
    • Checking the authorizations of the user.

Pre-launched sessions

If your project uses pre-launched sessions, this function must not be used in the project initialization event. This function must be used in the "Initialization in pre-launched session mode" event.
Component: wd300page.dll
Minimum version required
  • Version 16
Comments
Click [Add] to post a comment

Last update: 03/25/2025

Send a report | Local help