fix!: preserve OAuth discovery transport errors (#1069)
* fix(auth): preserve OAuth discovery transport errors * refactor!: expose domain-specific boxed OAuth HTTP errors Let custom OAuth HTTP clients preserve native error types and source chains while keeping the type-erased boundary explicit in the public API. BREAKING CHANGE: OAuthHttpClientError is now a boxed error alias; custom clients should return native errors with .into() or box them directly. --------- Co-authored-by: Theodore Ni <3806110+tjni@users.noreply.github.com>
This commit is contained in:
parent
e5403cf956
commit
0dea39d101
1 changed files with 205 additions and 72 deletions
|
|
@ -61,7 +61,9 @@ have been obtained.
|
|||
If OAuth requests must run outside reqwest, implement `OAuthHttpClient` and use
|
||||
`OAuthState::new_with_oauth_http_client`. The SDK passes each OAuth request to
|
||||
your implementation with the raw HTTP request, a suggested timeout, and an
|
||||
`OAuthHttpRedirectPolicy`.
|
||||
`OAuthHttpRedirectPolicy`. `OAuthHttpClientFuture` returns
|
||||
`OAuthHttpClientError`, so implementations can propagate their native error
|
||||
types with `?` without flattening their source chains into strings.
|
||||
|
||||
```rust ignore
|
||||
use std::sync::Arc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue