pub struct ReqwestOidcHttpClient { /* private fields */ }Expand description
Default OIDC HTTP client backed by the canonical rskit-httpclient.
Implementations§
Source§impl ReqwestOidcHttpClient
impl ReqwestOidcHttpClient
Sourcepub fn new() -> Result<Self, OidcError>
pub fn new() -> Result<Self, OidcError>
Create a default OIDC HTTP client using the canonical rskit HTTP client.
§Errors
Returns an error when the HTTP client cannot be constructed.
Sourcepub fn with_config(config: HttpClientConfig) -> Result<Self, OidcError>
pub fn with_config(config: HttpClientConfig) -> Result<Self, OidcError>
Create an OIDC HTTP client with explicit HTTP configuration.
§Errors
Returns an error when the HTTP client cannot be constructed.
Trait Implementations§
Source§impl Debug for ReqwestOidcHttpClient
impl Debug for ReqwestOidcHttpClient
Source§impl OidcHttpClient for ReqwestOidcHttpClient
impl OidcHttpClient for ReqwestOidcHttpClient
Source§fn get_json<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
bearer_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Value, OidcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_json<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
bearer_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Value, OidcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fetch JSON from a URL, optionally using bearer authentication.
Auto Trait Implementations§
impl !RefUnwindSafe for ReqwestOidcHttpClient
impl !UnwindSafe for ReqwestOidcHttpClient
impl Freeze for ReqwestOidcHttpClient
impl Send for ReqwestOidcHttpClient
impl Sync for ReqwestOidcHttpClient
impl Unpin for ReqwestOidcHttpClient
impl UnsafeUnpin for ReqwestOidcHttpClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more