pub async fn oauth_protected_resource(
http_client: &Client,
aip_server: &str,
) -> Result<OAuthProtectedResource, OAuthClientError>
Expand description
Fetch OAuth protected resource metadata from an AIP server.
§Arguments
http_client
- The HTTP client to use for making the requestaip_server
- The base URL of the AIP server (e.g., “https://example.com”)
§Returns
Returns the OAuth protected resource metadata on success, or an error if:
- The HTTP request fails
- The response cannot be parsed as valid OAuth protected resource metadata
§Example
use atproto_oauth_aip::resources::oauth_protected_resource;
let resource = oauth_protected_resource(&http_client, "https://bsky.social").await?;