![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) 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
Use ChilkatAx-win32.pkg Procedure Test Handle hoHttp Variant vResp Handle hoResp Handle hoJsonResponse Boolean iSuccess String sAuthorization_endpoint Boolean iClaims_parameter_supported String sIssuer String sJwks_uri Boolean iRequest_parameter_supported Boolean iRequest_uri_parameter_supported String sToken_endpoint String sUserinfo_endpoint String sIntrospection_endpoint String sRevocation_endpoint Integer i Integer iCount_i String sStrVal String sTemp1 Integer iTemp1 Boolean bTemp1 // This example requires the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. Get Create (RefClass(cComChilkatHttp)) To hoHttp If (Not(IsComObjectCreated(hoHttp))) Begin Send CreateComObject of hoHttp End Set ComAccept Of hoHttp To "application/json" Get ComQuickRequest Of hoHttp "GET" "https://<account>.onelogin.com/oidc/.well-known/openid-configuration" To vResp If (IsComObject(vResp)) Begin Get Create (RefClass(cComChilkatHttpResponse)) To hoResp Set pvComObject Of hoResp To vResp End Get ComLastMethodSuccess Of hoHttp To bTemp1 If (bTemp1 <> True) Begin Get ComLastErrorText Of hoHttp To sTemp1 Showln sTemp1 Procedure_Return End Get ComStatusCode Of hoResp To iTemp1 Showln "Response Status Code: " iTemp1 Get Create (RefClass(cComChilkatJsonObject)) To hoJsonResponse If (Not(IsComObjectCreated(hoJsonResponse))) Begin Send CreateComObject of hoJsonResponse End Get ComBodyStr Of hoResp To sTemp1 Get ComLoad Of hoJsonResponse sTemp1 To iSuccess Set ComEmitCompact Of hoJsonResponse To False Get ComEmit Of hoJsonResponse To sTemp1 Showln sTemp1 Get ComStatusCode Of hoResp To iTemp1 If (iTemp1 <> 200) Begin Showln "Failed." Send Destroy of hoResp Procedure_Return End Send Destroy of hoResp // 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" // ] // } // Get ComStringOf Of hoJsonResponse "authorization_endpoint" To sAuthorization_endpoint Get ComBoolOf Of hoJsonResponse "claims_parameter_supported" To iClaims_parameter_supported Get ComStringOf Of hoJsonResponse "issuer" To sIssuer Get ComStringOf Of hoJsonResponse "jwks_uri" To sJwks_uri Get ComBoolOf Of hoJsonResponse "request_parameter_supported" To iRequest_parameter_supported Get ComBoolOf Of hoJsonResponse "request_uri_parameter_supported" To iRequest_uri_parameter_supported Get ComStringOf Of hoJsonResponse "token_endpoint" To sToken_endpoint Get ComStringOf Of hoJsonResponse "userinfo_endpoint" To sUserinfo_endpoint Get ComStringOf Of hoJsonResponse "introspection_endpoint" To sIntrospection_endpoint Get ComStringOf Of hoJsonResponse "revocation_endpoint" To sRevocation_endpoint Move 0 To i Get ComSizeOfArray Of hoJsonResponse "acr_values_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "acr_values_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "claims_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "claims_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "grant_types_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "grant_types_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "id_token_signing_alg_values_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "id_token_signing_alg_values_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "response_modes_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "response_modes_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "response_types_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "response_types_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "scopes_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "scopes_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "subject_types_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "subject_types_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "token_endpoint_auth_methods_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "token_endpoint_auth_methods_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "userinfo_signing_alg_values_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "code_challenge_methods_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "code_challenge_methods_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "introspection_endpoint_auth_methods_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "introspection_endpoint_auth_methods_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "revocation_endpoint_auth_methods_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "revocation_endpoint_auth_methods_supported[i]" To sStrVal Move (i + 1) To i Loop Move 0 To i Get ComSizeOfArray Of hoJsonResponse "claim_types_supported" To iCount_i While (i < iCount_i) Set ComI Of hoJsonResponse To i Get ComStringOf Of hoJsonResponse "claim_types_supported[i]" To sStrVal Move (i + 1) To i Loop End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.