get_discovery_doc Method
Gets the OpenID Discovery Document.
Syntax
def get_discovery_doc(url: str) -> None: ...
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 on_get_discovery_doc before calling get_authorization 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 on_get_discovery_doc on subsequent authorization requests.
The following discovery document fields are populated after on_get_discovery_doc returns:
- discovery_doc_details_authorization_url
- discovery_doc_details_claims_param_supported
- discovery_doc_details_issuer
- discovery_doc_details_signer_cert_url
- discovery_doc_details_registration_url
- discovery_doc_details_service_docs_url
- discovery_doc_details_supported_claims
- discovery_doc_details_supported_displays
- discovery_doc_details_supported_grant_types
- discovery_doc_details_supported_response_types
- discovery_doc_details_supported_scopes
- discovery_doc_details_token_url
- discovery_doc_details_user_info_url
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.