pub struct AuthProxyState { /* private fields */ }Expand description
Shared state of the proxy: the token registry, the configuration and the upstream HTTP client. Cheap to clone.
§Examples
use ironflow_auth_proxy::{AuthProxyConfig, AuthProxyState};
let state = AuthProxyState::new(AuthProxyConfig::new("0123456789abcdef0123456789abcdef"))?;
assert!(state.registry().is_empty());Implementations§
Source§impl AuthProxyState
impl AuthProxyState
Sourcepub fn new(config: AuthProxyConfig) -> Result<Self, ReqwestError>
pub fn new(config: AuthProxyConfig) -> Result<Self, ReqwestError>
Build the state with an empty registry.
The upstream client never follows redirects and only bounds the connection time.
§Errors
Returns the reqwest::Error raised when the HTTP client cannot be
built (TLS backend initialisation).
§Examples
See AuthProxyState.
Sourcepub fn registry(&self) -> &AuthProxyRegistry
pub fn registry(&self) -> &AuthProxyRegistry
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AuthProxyState
impl !UnwindSafe for AuthProxyState
impl Freeze for AuthProxyState
impl Send for AuthProxyState
impl Sync for AuthProxyState
impl Unpin for AuthProxyState
impl UnsafeUnpin for AuthProxyState
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