IPWorks Auth 2020 JavaScript Edition

Questions / Feedback?

GetDiscoveryDoc Method

Gets the OpenID Discovery Document.

Syntax

async openid.getDiscoveryDoc(URL : string): Promise<void>

Remarks

This method gets the OpenID Connect Discovery Document specified by the URL parameter and parses the response. The discover document contains details about the OpenID Provider configuration including endpoint URLs, supported claims and response types, and more.

The discovery document URL is typically published by an OpenID provider and must be known before calling this method. The format of the URL is standardized and typically takes the form:

https://www.youropenidserver.com/.well-known/openid-configuration

Call GetDiscoveryDoc before calling GetAuthorization to populate the class properties with information required to complete the authorization. The retrieved information includes endpoint URLs as well as the OpenID public certificates used to verify the signature on the ID token. After calling this method the following properties are populated:

The above values may be stored, and later populated from the stored values, to avoid the requirement of calling GetDiscoveryDoc on subsequent authorization requests.

The following discovery document fields are populated after GetDiscoveryDoc returns:

  • DiscoveryDocDetailsAuthorizationURL
  • DiscoveryDocDetailsClaimsParamSupported
  • DiscoveryDocDetailsIssuer
  • DiscoveryDocDetailsSignerCertURL
  • DiscoveryDocDetailsRegistrationURL
  • DiscoveryDocDetailsServiceDocsURL
  • DiscoveryDocDetailsSupportedClaims
  • DiscoveryDocDetailsSupportedDisplays
  • DiscoveryDocDetailsSupportedGrantTypes
  • DiscoveryDocDetailsSupportedResponseTypes
  • DiscoveryDocDetailsSupportedScopes
  • DiscoveryDocDetailsTokenURL
  • DiscoveryDocDetailsUserInfoURL

To access values not automatically parsed by the class the XPath configuration setting may be set to retrieve a specific value. Alternatively the RawJSON setting returns the entire JSON document which may be parsed separately.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Auth 2020 JavaScript Edition - Version 20.0 [Build 8262]