Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

PowerBuilder Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
Jira
Lightspeed
MYOB
Magento
Mailgun
Mastercard
MedTunnel

MercadoLibre
MessageMedia
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
OpenAI ChatGPT
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
Trello
Twilio
Twitter API v2
Twitter v1
UniPin
VoiceBase
Vonage
WaTrend
Walmart
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yapily
Yousign
ZATCA
Zendesk
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(PowerBuilder) OneLogin OIDC - Get Discovery Document (OpenID Connect)

Downloads the OpenID Connect self-discovery document for a OneLogin OIDC enabled app.

For more information, see https://developers.onelogin.com/openid-connect/connect-to-onelogin

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

integer li_rc
oleobject loo_Http
oleobject loo_Resp
oleobject loo_JsonResponse
string ls_Authorization_endpoint
integer li_Claims_parameter_supported
string ls_Issuer
string ls_Jwks_uri
integer li_Request_parameter_supported
integer li_Request_uri_parameter_supported
string ls_Token_endpoint
string ls_Userinfo_endpoint
string ls_Introspection_endpoint
string ls_Revocation_endpoint
integer i
integer li_Count_i
string ls_StrVal

// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

loo_Http.Accept = "application/json"

loo_Resp = loo_Http.QuickRequest("GET","https://<account>.onelogin.com/oidc/.well-known/openid-configuration")
if loo_Http.LastMethodSuccess <> 1 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    return
end if

Write-Debug "Response Status Code: " + string(loo_Resp.StatusCode)

loo_JsonResponse = create oleobject
li_rc = loo_JsonResponse.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_JsonResponse.Load(loo_Resp.BodyStr)
loo_JsonResponse.EmitCompact = 0
Write-Debug loo_JsonResponse.Emit()

if loo_Resp.StatusCode <> 200 then
    Write-Debug "Failed."
    destroy loo_Resp
    destroy loo_Http
    destroy loo_JsonResponse
    return
end if

destroy loo_Resp

// Sample output...
// (See the parsing code below..)
// 
// Use the this online tool to generate parsing code from sample JSON: 
// Generate Parsing Code from JSON

// {
//   "acr_values_supported": [
//     "onelogin:nist:level:1:re-auth"
//   ],
//   "authorization_endpoint": "https://chilkat-dev.onelogin.com/oidc/auth",
//   "claims_parameter_supported": true,
//   "claims_supported": [
//     "acr",
//     "auth_time",
//     "company",
//     "custom_fields",
//     "department",
//     "email",
//     "family_name",
//     "given_name",
//     "groups",
//     "iss",
//     "locale_code",
//     "name",
//     "params",
//     "phone_number",
//     "preferred_username",
//     "sid",
//     "sub",
//     "title",
//     "updated_at"
//   ],
//   "grant_types_supported": [
//     "authorization_code",
//     "implicit",
//     "refresh_token",
//     "client_credentials",
//     "password"
//   ],
//   "id_token_signing_alg_values_supported": [
//     "RS256"
//   ],
//   "issuer": "https://openid-connect.onelogin.com/oidc",
//   "jwks_uri": "https://chilkat-dev.onelogin.com/oidc/certs",
//   "request_parameter_supported": false,
//   "request_uri_parameter_supported": false,
//   "response_modes_supported": [
//     "form_post",
//     "fragment",
//     "query"
//   ],
//   "response_types_supported": [
//     "code",
//     "id_token token",
//     "id_token"
//   ],
//   "scopes_supported": [
//     "openid",
//     "name",
//     "profile",
//     "groups",
//     "email",
//     "params",
//     "phone"
//   ],
//   "subject_types_supported": [
//     "public"
//   ],
//   "token_endpoint": "https://chilkat-dev.onelogin.com/oidc/token",
//   "token_endpoint_auth_methods_supported": [
//     "client_secret_basic",
//     "client_secret_post",
//     "none"
//   ],
//   "userinfo_endpoint": "https://chilkat-dev.onelogin.com/oidc/me",
//   "userinfo_signing_alg_values_supported": [
//   ],
//   "code_challenge_methods_supported": [
//     "S256"
//   ],
//   "introspection_endpoint": "https://chilkat-dev.onelogin.com/oidc/token/introspection",
//   "introspection_endpoint_auth_methods_supported": [
//     "client_secret_basic",
//     "client_secret_post",
//     "none"
//   ],
//   "revocation_endpoint": "https://chilkat-dev.onelogin.com/oidc/token/revocation",
//   "revocation_endpoint_auth_methods_supported": [
//     "client_secret_basic",
//     "client_secret_post",
//     "none"
//   ],
//   "claim_types_supported": [
//     "normal"
//   ]
// }
// 

ls_Authorization_endpoint = loo_JsonResponse.StringOf("authorization_endpoint")
li_Claims_parameter_supported = loo_JsonResponse.BoolOf("claims_parameter_supported")
ls_Issuer = loo_JsonResponse.StringOf("issuer")
ls_Jwks_uri = loo_JsonResponse.StringOf("jwks_uri")
li_Request_parameter_supported = loo_JsonResponse.BoolOf("request_parameter_supported")
li_Request_uri_parameter_supported = loo_JsonResponse.BoolOf("request_uri_parameter_supported")
ls_Token_endpoint = loo_JsonResponse.StringOf("token_endpoint")
ls_Userinfo_endpoint = loo_JsonResponse.StringOf("userinfo_endpoint")
ls_Introspection_endpoint = loo_JsonResponse.StringOf("introspection_endpoint")
ls_Revocation_endpoint = loo_JsonResponse.StringOf("revocation_endpoint")
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("acr_values_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("acr_values_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("claims_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("claims_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("grant_types_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("grant_types_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("id_token_signing_alg_values_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("id_token_signing_alg_values_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("response_modes_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("response_modes_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("response_types_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("response_types_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("scopes_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("scopes_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("subject_types_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("subject_types_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("token_endpoint_auth_methods_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("token_endpoint_auth_methods_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("userinfo_signing_alg_values_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("code_challenge_methods_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("code_challenge_methods_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("introspection_endpoint_auth_methods_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("introspection_endpoint_auth_methods_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("revocation_endpoint_auth_methods_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("revocation_endpoint_auth_methods_supported[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JsonResponse.SizeOfArray("claim_types_supported")
do while i < li_Count_i
    loo_JsonResponse.I = i
    ls_StrVal = loo_JsonResponse.StringOf("claim_types_supported[i]")
    i = i + 1
loop


destroy loo_Http
destroy loo_JsonResponse

 

© 2000-2023 Chilkat Software, Inc. All Rights Reserved.