ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2025 feature!
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
When SSO authentication is used, checks the validity of the current user's token.
Example
// Example used to retrieve a token to perform a request on Dropbox
OAuth2Params is OAuth2Parameters
OAuth2Params.ClientID = "01234567890123456789" 
OAuth2Params.ClientSecret = "98765432109876543210"
OAuth2Params.AuthURL = "https://www.dropbox.com/oauth2/authorize"
OAuth2Params.TokenURL = "https://api.dropboxapi.com/oauth2/token"
OAuth2Params.AdditionalParameters = "force_reapprove=false"
<COMPILE IF ConfigurationType<>Site>
	// If you are not using a website, you need to specify a localhost redirect URL
	OAuth2Params.RedirectionURL = "http://localhost:9874/"
<END>

// Checks if a user is already logged in
MyToken is AuthToken = AuthVerifyAuthentication(OAuth2Params)
IF NOT MyToken.Valid THEN
	// Authentication request: opens the login window
	MyToken = AuthIdentify(OAuth2Params)
END
Syntax

Verifying an SSO authentication token via OAuth 2.0 Hide the details

<Result> = AuthVerifyAuthentication(<Authentication parameters>)
<Result>: AuthToken variable
AuthToken variable corresponding to the token containing the access information for the next requests that require authentication.
<Authentication parameters>: OAuth2Parameters variable
Name of the OAuth2Parameters variable containing the parameters describing the elements required to retrieve the access token.

Verifying an SSO authentication token via OpenID Hide the details

<Result> = AuthVerifyAuthentication(<Authentication parameters>)
<Result>: AuthToken variable
AuthToken variable corresponding to the token containing the access information for the next requests that require authentication.
<Authentication parameters>: OpenIDParameters variable
Name of the OpenIDParameters variable containing the parameters describing the elements required to retrieve the access token.

Verifying an SSO authentication token via OAuth 2.0 (asynchronous syntax) Hide the details

AuthVerifyAuthentication(<Authentication parameters> , <WLanguage procedure>)
<Authentication parameters>: OAuth2Parameters variable
Name of the OAuth2Parameters variable containing the parameters describing the elements required to retrieve the access token.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called during the authentication. For more details on this procedure, see Parameters of the procedure used by AuthVerifyAuthentication.

Verifying an SSO authentication token via OpenID (asynchronous syntax) Hide the details

AuthVerifyAuthentication(<Authentication parameters> , <WLanguage procedure>)
<Authentication parameters>: OpenIDParameters variable
Name of the OpenIDParameters variable containing the parameters describing the elements required to retrieve the access token.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called during the authentication. For more details on this procedure, see Parameters of the procedure used by AuthVerifyAuthentication.
Component: wd300ggl.dll
Minimum version required
  • Version 2025
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 02/12/2025

Send a report | Local help