Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

VB.NET UWP/WinRT Examples

Web API Categories

ASN.1
Amazon EC2
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Azure Cloud Storage
Azure Service Bus
Azure Table Service
Base64
Bounced Email
Box
CAdES
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
EBICS
ECC
Ed25519
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
GMail SMTP/IMAP/POP
Geolocation
Google APIs
Google Calendar
Google Cloud SQL
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text
HTTP

HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
MS Storage Providers
Microsoft Graph
NTLM
OAuth1
OAuth2
OIDC
Office365
OneDrive
OpenSSL
Outlook
Outlook Calendar
Outlook Contact
PDF Signatures
PEM
PFX/P12
PKCS11
POP3
PRNG
REST
REST Misc
RSA
SCP
SCard
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
ScMinidriver
SharePoint
Socket/SSL/TLS
Spider
Stream
Tar Archive
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(VB.NET UWP/WinRT) Azure Fetch OpenID Connect metadata document

See more OIDC Examples

Downloads the OpenID Connect self-discovery document for an Azure OIDC enabled app.

For more information, see https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc

Chilkat Universal Windows Platform (UWP) / WinRT Downloads

Chilkat for the Universal Windows Platform (UWP)

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

Dim http As New Chilkat.Http


http.Accept = "application/json"

' See the Microsoft Azure OIDC documentation at https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc
' The "tenant" can take one of four values described in the documentation at the link above.

Dim success As Boolean = http.SetUrlVar("tenant","6d8ddd66-68d1-44b0-af5c-e31b4b7ee5cd")
Dim resp As Chilkat.HttpResponse = Await http.QuickRequestAsync("GET","https://login.microsoftonline.com/{$tenant}/v2.0/.well-known/openid-configuration")
If (http.LastMethodSuccess <> True) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


Debug.WriteLine("Response Status Code: " & resp.StatusCode)

Dim json As New Chilkat.JsonObject
json.Load(resp.BodyStr)
json.EmitCompact = False
Debug.WriteLine(json.Emit())

If (resp.StatusCode <> 200) Then
    Debug.WriteLine("Failed.")

    Exit Sub
End If




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

' {
'   "token_endpoint": "https://login.microsoftonline.com/6d8ddd66-68d1-44b0-af5c-e31b4b7ee5cd/oauth2/v2.0/token",
'   "token_endpoint_auth_methods_supported": [
'     "client_secret_post",
'     "private_key_jwt",
'     "client_secret_basic"
'   ],
'   "jwks_uri": "https://login.microsoftonline.com/6d8ddd66-68d1-44b0-af5c-e31b4b7ee5cd/discovery/v2.0/keys",
'   "response_modes_supported": [
'     "query",
'     "fragment",
'     "form_post"
'   ],
'   "subject_types_supported": [
'     "pairwise"
'   ],
'   "id_token_signing_alg_values_supported": [
'     "RS256"
'   ],
'   "response_types_supported": [
'     "code",
'     "id_token",
'     "code id_token",
'     "id_token token"
'   ],
'   "scopes_supported": [
'     "openid",
'     "profile",
'     "email",
'     "offline_access"
'   ],
'   "issuer": "https://login.microsoftonline.com/6d8ddd66-68d1-44b0-af5c-e31b4b7ee5cd/v2.0",
'   "request_uri_parameter_supported": false,
'   "userinfo_endpoint": "https://graph.microsoft.com/oidc/userinfo",
'   "authorization_endpoint": "https://login.microsoftonline.com/6d8ddd66-68d1-44b0-af5c-e31b4b7ee5cd/oauth2/v2.0/authorize",
'   "device_authorization_endpoint": "https://login.microsoftonline.com/6d8ddd66-68d1-44b0-af5c-e31b4b7ee5cd/oauth2/v2.0/devicecode",
'   "http_logout_supported": true,
'   "frontchannel_logout_supported": true,
'   "end_session_endpoint": "https://login.microsoftonline.com/6d8ddd66-68d1-44b0-af5c-e31b4b7ee5cd/oauth2/v2.0/logout",
'   "claims_supported": [
'     "sub",
'     "iss",
'     "cloud_instance_name",
'     "cloud_instance_host_name",
'     "cloud_graph_host_name",
'     "msgraph_host",
'     "aud",
'     "exp",
'     "iat",
'     "auth_time",
'     "acr",
'     "nonce",
'     "preferred_username",
'     "name",
'     "tid",
'     "ver",
'     "at_hash",
'     "c_hash",
'     "email"
'   ],
'   "kerberos_endpoint": "https://login.microsoftonline.com/6d8ddd66-68d1-44b0-af5c-e31b4b7ee5cd/kerberos",
'   "tenant_region_scope": "NA",
'   "cloud_instance_name": "microsoftonline.com",
'   "cloud_graph_host_name": "graph.windows.net",
'   "msgraph_host": "graph.microsoft.com",
'   "rbac_url": "https://pas.windows.net"
' }



Dim strVal As String

Dim token_endpoint As String = json.StringOf("token_endpoint")
Dim jwks_uri As String = json.StringOf("jwks_uri")
Dim issuer As String = json.StringOf("issuer")
Dim request_uri_parameter_supported As Boolean = json.BoolOf("request_uri_parameter_supported")
Dim userinfo_endpoint As String = json.StringOf("userinfo_endpoint")
Dim authorization_endpoint As String = json.StringOf("authorization_endpoint")
Dim device_authorization_endpoint As String = json.StringOf("device_authorization_endpoint")
Dim http_logout_supported As Boolean = json.BoolOf("http_logout_supported")
Dim frontchannel_logout_supported As Boolean = json.BoolOf("frontchannel_logout_supported")
Dim end_session_endpoint As String = json.StringOf("end_session_endpoint")
Dim kerberos_endpoint As String = json.StringOf("kerberos_endpoint")
Dim tenant_region_scope As String = json.StringOf("tenant_region_scope")
Dim cloud_instance_name As String = json.StringOf("cloud_instance_name")
Dim cloud_graph_host_name As String = json.StringOf("cloud_graph_host_name")
Dim msgraph_host As String = json.StringOf("msgraph_host")
Dim rbac_url As String = json.StringOf("rbac_url")
Dim i As Integer = 0
Dim count_i As Integer = json.SizeOfArray("token_endpoint_auth_methods_supported")
While i < count_i
    json.I = i
    strVal = json.StringOf("token_endpoint_auth_methods_supported[i]")
    i = i + 1
End While
i = 0
count_i = json.SizeOfArray("response_modes_supported")
While i < count_i
    json.I = i
    strVal = json.StringOf("response_modes_supported[i]")
    i = i + 1
End While
i = 0
count_i = json.SizeOfArray("subject_types_supported")
While i < count_i
    json.I = i
    strVal = json.StringOf("subject_types_supported[i]")
    i = i + 1
End While
i = 0
count_i = json.SizeOfArray("id_token_signing_alg_values_supported")
While i < count_i
    json.I = i
    strVal = json.StringOf("id_token_signing_alg_values_supported[i]")
    i = i + 1
End While
i = 0
count_i = json.SizeOfArray("response_types_supported")
While i < count_i
    json.I = i
    strVal = json.StringOf("response_types_supported[i]")
    i = i + 1
End While
i = 0
count_i = json.SizeOfArray("scopes_supported")
While i < count_i
    json.I = i
    strVal = json.StringOf("scopes_supported[i]")
    i = i + 1
End While
i = 0
count_i = json.SizeOfArray("claims_supported")
While i < count_i
    json.I = i
    strVal = json.StringOf("claims_supported[i]")
    i = i + 1
End While

 

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