pub struct ClientCredentialsProvider { /* private fields */ }Implementations§
Source§impl ClientCredentialsProvider
impl ClientCredentialsProvider
Sourcepub async fn new(
token_endpoint: String,
client_id: String,
client_secret: String,
scope: Option<String>,
audience: Option<Vec<String>>,
) -> Result<Self, AuthError>
pub async fn new( token_endpoint: String, client_id: String, client_secret: String, scope: Option<String>, audience: Option<Vec<String>>, ) -> Result<Self, AuthError>
Creates a production OAuth2 provider with HTTPS enforcement, SSRF guard, DNS-rebinding protection, and hardened timeouts.
Validates the token endpoint is a public HTTPS URI, resolves DNS and pins validated IPs on the HTTP client — closing the TOCTOU window between validation and the first outbound token request.
Trait Implementations§
Source§impl Debug for ClientCredentialsProvider
impl Debug for ClientCredentialsProvider
Auto Trait Implementations§
impl !Freeze for ClientCredentialsProvider
impl !RefUnwindSafe for ClientCredentialsProvider
impl !UnwindSafe for ClientCredentialsProvider
impl Send for ClientCredentialsProvider
impl Sync for ClientCredentialsProvider
impl Unpin for ClientCredentialsProvider
impl UnsafeUnpin for ClientCredentialsProvider
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