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
Checks the validity of the current user's token in the case of SSO authentication.
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 TypeConfiguration <> 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

Verify SSO authentication token via OAuth 2.0 protocol 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.

Verify SSO authentication token via OpenID protocol 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.

Check SSO authentication token via OAuth 2.0 protocol (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 AuthVérifieAuthentification.

Check SSO authentication token via OpenID protocol (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 AuthVérifieAuthentification.
Component: wd300ggl.dll
Minimum version required
  • Version 2025
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/13/2024

Send a report | Local help