ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2025 feature!
This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Managing the OAuth 2.0 protocol
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Logs out a user previously authenticated via:
  • the OAuth 2.0 protocol on any web service.
  • the OpenID protocol on any web service.
    New in version 2025
    AndroidAndroid Widget This syntax is now available in Android and Android Widget.
  • WindowsLinux a JSON Web Token (JWT).
Remarks:
  • The logout opens a browser (as for the login). The redirect URL is called when the logout is performed. To log in again, the user will have to go through the entire login process.
  • When you use a variable of type OAuth2Parameters, you need to specify the logout URL with the LogoutURL property.
Example
stOpenIDParam is OpenIDParameters
stOpenIDParam.ConfigurationURL = "https://login.microsoftonline.com/99f49690-a048-4e6e-a51e-9e6e96b4981d/v2.0/.well-known/openid-configuration"
stOpenIDParam.ClientID = "99f10db4-c3b1-437f-8362-8070750f0190"
stOpenIDParam.Scope = "email openid"
stOpenIDParam.RedirectionURL = "http://localhost:9874"
stToken is AuthToken = AuthIdentify(stOpenIDParam)
IF ErrorOccurred THEN
	Error(ErrorInfo(errFullDetails))
	RETURN
END
Identity is OpenIDIdentity = OpenIDReadIdentity(stToken)
IF ErrorOccurred THEN
	Error(ErrorInfo(errFullDetails))
	RETURN
END
Trace(Identity.Email)
AuthLogout(stToken)
Syntax

Logging out a user previously authenticated using OAuth 2.0 Hide the details

<Result> = AuthLogout(<OAuth authentication>)
<Result>: Boolean
  • True if the logout was performed,
  • False otherwise.
<OAuth authentication>: OAuth2Parameters variable
Name of the OAuth2Parameters variable corresponding to the session to be closed. The LogoutURL property indicates the page to be displayed after logout.

Logging out a user previously authenticated using OAuth 2.0 (asynchronous syntax) Hide the details

AuthLogout(<OAuth authentication> , <WLanguage procedure>)
<OAuth authentication>: OAuth2Parameters variable
Name of the OAuth2Parameters variable corresponding to the session to be closed. The LogoutURL property indicates the page to be displayed after logout.
<WLanguage procedure>: Procedure name
Optional WLanguage procedure to be called when the logout is performed. This procedure has the following format:
<Procedure name>(<Logout>)
where <Logout> is a boolean indicating whether or not the logout has been performed (True or False, respectively).

Logging out a user previously authenticated using OpenID Hide the details

<Result> = AuthLogout(<OpenID authentication>)
<Result>: Boolean
  • True if the logout was performed,
  • False otherwise.
<OpenID authentication>: OpenIDParameters variable
Name of the OpenIDParameters variable corresponding to the session to be closed.

Logging out a user previously authenticated using OpenID (asynchronous syntax) Hide the details

AuthLogout(<OpenID authentication> , <WLanguage procedure>)
<OpenID authentication>: OpenIDParameters variable
Name of the OpenIDParameters variable corresponding to the session to be closed.
<WLanguage procedure>: Procedure name
Optional WLanguage procedure to be called when the logout is performed. This procedure has the following format:
<Procedure name>(<Logout>)
where <Logout> is a boolean indicating whether or not the logout has been performed (True or False, respectively).
WindowsLinux

Logging out a user previously authenticated using a JWT Hide the details

<Result> = AuthLogout(<Access token>)
<Result>: Boolean
  • True if the logout was performed,
  • False otherwise.
<Access token>: AuthToken variable
Name of the AuthToken variable corresponding to the access token.
WindowsLinux

Logging out a user previously authenticated using a JWT (asynchronous syntax) Hide the details

AuthLogout(<Access token> , <WLanguage procedure>)
<Access token>: AuthToken variable
Name of the AuthToken variable corresponding to the access token.
<WLanguage procedure>: Procedure name
Optional WLanguage procedure to be called when the logout is performed. This procedure has the following format:
<ProcedureName>(<Logout>)
where <Logout> is a boolean indicating whether or not the logout has been performed (True or False, respectively).
Component: wd300ggl.dll
Minimum version required
  • Version 2025
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/19/2024

Send a report | Local help