pub struct ApiKeyCallbackContext<'a> {
pub request: Option<&'a AuthRequest>,
pub endpoint: Option<EndpointCall>,
pub auth_config: &'a AuthConfig,
pub extensions: &'a ContextExtensions,
pub configuration_id: &'a str,
pub verification_input: Option<&'a VerifyApiKey<'a>>,
}Expand description
Immutable application context for trusted API-key lookup and validation.
HTTP authentication supplies the actual request. Programmatic verification
supplies no request unless using verify_api_key_with_request. Applications
may capture their own typed store or service in the callback implementation.
Fields§
§request: Option<&'a AuthRequest>§endpoint: Option<EndpointCall>Genuine logical context when verification is dispatched as a registered endpoint. It never manufactures a physical request for virtual calls.
auth_config: &'a AuthConfig§extensions: &'a ContextExtensions§configuration_id: &'a str§verification_input: Option<&'a VerifyApiKey<'a>>Original trusted verification input, including the requested scope and permissions. HTTP authentication callbacks have no server-only input.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ApiKeyCallbackContext<'a>
impl<'a> !UnwindSafe for ApiKeyCallbackContext<'a>
impl<'a> Freeze for ApiKeyCallbackContext<'a>
impl<'a> Send for ApiKeyCallbackContext<'a>
impl<'a> Sync for ApiKeyCallbackContext<'a>
impl<'a> Unpin for ApiKeyCallbackContext<'a>
impl<'a> UnsafeUnpin for ApiKeyCallbackContext<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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