PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
New WINDEV, WEBDEV, WINDEV Mobile 24 feature!
  • Properties specific to the description of OpenIDParameters variables
  • Property ..ConfigurationURL
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The type OpenIDParameters is used to define all the advanced features of an authentication for OpenID. The characteristics of this authentication for OpenID can be defined and modified by several WLanguage properties.
Note: See Declaring a variable for more details.
Example
OpenIDParams is OpenIDParameters
OpenIDParams..ConfigurationURL = "https://accounts.google.com/.well-known/OpenID-configuration"
OpenIDParams..ClientID = "1060349503186-pc7ahme???????7gk59q.apps.googleusercontent.com"
OpenIDParams..ClientSecret = "oBTQL52?????y9-76MpiM"
OpenIDParams..RedirectionURL = "http://localhost:9846"

MyToken is AuthToken = AuthIdentify(OpenIDParams)
IF ErrorOccurred THEN
Error(ErrorInfo())
RETURN
END

MyIdentity is OpenIDIdentity = OpenIDReadIdentity(MyToken)
IF MyIdentity..Valid THEN
Trace(MyIdentity..Email)
Trace(MyIdentity..Name)
Trace(MyIdentity..FirstName)
END
Remarks

Properties specific to the description of OpenIDParameters variables

The following properties can be used to manage the parameters of an OpenID authentication:
Property nameType usedEffect
ClientIDCharacter stringApplication identifier.
ClientSecretCharacter stringSecret application identifier.
ConfigurationURLCharacter stringDescription URL for the OpenID service (see Notes). In general, providers who offer OpenID make this URL available. Its format is as follows:
https://<Domain>/.well-known/OpenID-configuration
Some examples of URLs:
https://login.windows.net/contoso.onmicrosoft.com/
.well-known/OpenID-configuration
https://accounts.google.com/.well-known/openid-configuration
https://login.salesforce.com/.well-known/openid-configuration
https://login.yahoo.com/.well-known/openid-configuration
https://login.microsoftonline.com/contoso.onmicrosoft.com/
.well-known/openid-configuration
RedirectionURLCharacter stringURL used to redirect the result.

Note: These properties can be handled by using one of the following syntaxes:
  • <Variable name>..<Property name>
  • <Variable name>.<Property name>

Property ..ConfigurationURL

..ConfigurationURL corresponds to a URL that contains the description of the OpenID service. This description is the following format (for Google, for example)::
{
"issuer": "https://accounts.google.com",
"authorization_endpoint": "https://accounts.google.com/o/oauth2/v2/auth",
"token_endpoint": "https://oauth2.googleapis.com/token",
"userinfo_endpoint": "https://www.googleapis.com/oauth2/v3/userinfo",
"revocation_endpoint": "https://oauth2.googleapis.com/revoke",
"jwks_uri": "https://www.googleapis.com/oauth2/v3/certs",
"response_types_supported": [
 "code",
 "token",
 "id_token",
 "code token",
 "code id_token",
 "token id_token",
 "code token id_token",
 "none"
],
"subject_types_supported": [
 "public"
],
"id_token_signing_alg_values_supported": [
 "RS256"
],
"scopes_supported": [
 "openid",
 "email",
 "profile"
],
"token_endpoint_auth_methods_supported": [
 "client_secret_post",
 "client_secret_basic"
],
"claims_supported": [
 "aud",
 "email",
 "email_verified",
 "exp",
 "family_name",
 "given_name",
 "iat",
 "iss",
 "local",
 "name",
 "picture",
 "sub"
],
"code_challenge_methods_supported": [
 "plain",
 "S256"
]
}
The necessary parts are as follows:
  • authorization_endpoint: Authorization URL.
  • token_endpoint: URL for retrieving the token.
  • scopes_supported: List of information that can be retrieved.
Minimum required version
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment