pub async fn insecure_discover(
http_service: &BoxCloneSyncService<Request<Bytes>, Response<Bytes>, Box<dyn Error + Send + Sync>>,
issuer: &str,
) -> Result<VerifiedProviderMetadata, DiscoveryError>
Available on crate feature
experimental-oidc
only.Expand description
Fetch the provider metadata and make basic checks.
Contrary to discover()
, this uses
ProviderMetadata::insecure_verify_metadata()
to check the received
metadata instead of validating it according to the specification.
§Arguments
-
http_service
- The service to use for making HTTP requests. -
issuer
- The URL of the OpenID Connect Provider to fetch metadata for.
§Errors
Returns an error if the request fails or if the data is invalid.
§Warning
It is not recommended to use this method in production as it doesn’t ensure that the issuer implements the proper security practices.