pub(crate) struct AccessConnectorTokenHandler {
inner: Arc<RwLock<Inner>>,
}Expand description
Token handler for the PAM access connector.
Fields§
§inner: Arc<RwLock<Inner>>Implementations§
Source§impl AccessConnectorTokenHandler
impl AccessConnectorTokenHandler
Sourcepub(crate) fn key_store(&self) -> Option<KeyStore<KeySlotIds>>
pub(crate) fn key_store(&self) -> Option<KeyStore<KeySlotIds>>
The key store core created. Clones of a [KeyStore] share their keys, so clearing it on
revocation reaches core too.
Sourcepub(crate) fn set_session(&self, session: Arc<SessionManager>)
pub(crate) fn set_session(&self, session: Arc<SessionManager>)
Requests made before this lands cannot be authenticated.
pub(crate) fn session(&self) -> Option<Arc<SessionManager>>
Trait Implementations§
Source§impl Clone for AccessConnectorTokenHandler
impl Clone for AccessConnectorTokenHandler
Source§fn clone(&self) -> AccessConnectorTokenHandler
fn clone(&self) -> AccessConnectorTokenHandler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for AccessConnectorTokenHandler
impl Default for AccessConnectorTokenHandler
Source§fn default() -> AccessConnectorTokenHandler
fn default() -> AccessConnectorTokenHandler
Returns the “default value” for a type. Read more
Source§impl TokenHandler for AccessConnectorTokenHandler
impl TokenHandler for AccessConnectorTokenHandler
Source§fn set_tokens<'life0, 'async_trait>(
&'life0 self,
_token: String,
_refresh_token: Option<String>,
_expires_in: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_tokens<'life0, 'async_trait>(
&'life0 self,
_token: String,
_refresh_token: Option<String>,
_expires_in: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
No-op: SessionManager owns the bearer and its renewal.
Source§fn initialize_middleware(
&self,
_state_registry: &StateRegistry,
_identity_config: Configuration,
key_store: KeyStore<KeySlotIds>,
) -> Arc<dyn Middleware> ⓘ
fn initialize_middleware( &self, _state_registry: &StateRegistry, _identity_config: Configuration, key_store: KeyStore<KeySlotIds>, ) -> Arc<dyn Middleware> ⓘ
Initialize middleware that handles token attachment and renewal.
This middleware should look for the presence of the [bitwarden_api_base::AuthRequired]
extension to decide when to attach tokens. It’s then free to attach tokens as it sees fit,
including pausing and retrying requests to renew tokens.
§fn set_sm_login_method<'life0, 'async_trait>(
&'life0 self,
_login_method: ServiceAccountLoginMethod,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn set_sm_login_method<'life0, 'async_trait>(
&'life0 self,
_login_method: ServiceAccountLoginMethod,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Secrets-Manager-only hook for storing the Service Account login method on the handler
itself. SM tokens are not persisted, so the login method lives in-memory on the
SecretsManagerTokenHandler implementation.
The default no-op implementation is intentional: handlers that do not back Secrets Manager
(PM, Noop, ClientManaged) should ignore this call. This will be removed once the auth
crate fully owns the login process.
Auto Trait Implementations§
impl Freeze for AccessConnectorTokenHandler
impl RefUnwindSafe for AccessConnectorTokenHandler
impl Send for AccessConnectorTokenHandler
impl Sync for AccessConnectorTokenHandler
impl Unpin for AccessConnectorTokenHandler
impl UnsafeUnpin for AccessConnectorTokenHandler
impl UnwindSafe for AccessConnectorTokenHandler
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Consume a handle, getting back the initial
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more