pub struct AllowAllAuthenticator<T, RC>where
    RC: RcBound,
    RC::Result: Send + 'static,{ /* private fields */ }
Expand description

Dummy Authenticator, that blindly inserts authorization data, allowing all access to an endpoint with the specified subject.

Implementations§

source§

impl<T, RC> AllowAllAuthenticator<T, RC>where RC: RcBound, RC::Result: Send + 'static,

source

pub fn new<U: Into<String>>(inner: T, subject: U) -> Self

Create a middleware that authorizes with the configured subject.

Trait Implementations§

source§

impl<T, RC> Clone for AllowAllAuthenticator<T, RC>where T: Clone, RC: RcBound, RC::Result: Send + 'static,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug, RC> Debug for AllowAllAuthenticator<T, RC>where RC: RcBound + Debug, RC::Result: Send + 'static,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T, B, RC> Service<(Request<B>, RC)> for AllowAllAuthenticator<T, RC>where RC: RcBound, RC::Result: Send + 'static, T: Service<(Request<B>, RC::Result)>,

§

type Response = <T as Service<(Request<B>, <RC as Push<Option<Authorization>>>::Result)>>::Response

Responses given by the service.
§

type Error = <T as Service<(Request<B>, <RC as Push<Option<Authorization>>>::Result)>>::Error

Errors produced by the service.
§

type Future = <T as Service<(Request<B>, <RC as Push<Option<Authorization>>>::Result)>>::Future

The future response value.
source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: (Request<B>, RC)) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<T, RC> RefUnwindSafe for AllowAllAuthenticator<T, RC>where RC: RefUnwindSafe, T: RefUnwindSafe,

§

impl<T, RC> Send for AllowAllAuthenticator<T, RC>where T: Send,

§

impl<T, RC> Sync for AllowAllAuthenticator<T, RC>where RC: Sync, T: Sync,

§

impl<T, RC> Unpin for AllowAllAuthenticator<T, RC>where RC: Unpin, T: Unpin,

§

impl<T, RC> UnwindSafe for AllowAllAuthenticator<T, RC>where RC: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, S, F, Target, ReqBody, ResBody, Error, MakeError> CompositedMakeService<Target, ReqBody, ResBody, Error, MakeError> for Twhere Target: Send, T: Service<Target, Response = S, Future = F, Error = MakeError> + Send, F: Future<Output = Result<S, MakeError>> + Send + 'static, S: CompositedService<ReqBody, ResBody, Error> + Send + 'static,

source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), MakeError>>

Available on crate feature server and (crate features http1 or http2) only.
See tower_service::Service::poll_ready
source§

fn call( &mut self, target: Target ) -> Pin<Box<dyn Future<Output = Result<Box<dyn CompositedService<ReqBody, ResBody, Error> + Send, Global>, MakeError>> + Send, Global>>

Available on crate feature server and (crate features http1 or http2) only.
See tower_service::Service::call
source§

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

§

type Remainder = Choices

source§

fn subset( self ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U, I> LiftInto<U, I> for Twhere U: LiftFrom<T, I>,

source§

fn lift_into(self) -> U

Performs the indexed conversion.
source§

impl<Source> Sculptor<HNil, HNil> for Source

§

type Remainder = Source

source§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Typeable for Twhere T: Any,

§

fn get_type(&self) -> TypeId

Get the TypeId of this object.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<ReqB, ResB, Context, T> SwaggerService<ReqB, ResB, Context> for Twhere T: Clone + Service<(Request<ReqB>, Context), Response = Response<ResB>, Error = Error, Future = Pin<Box<dyn Future<Output = Result<Response<ResB>, Error>>, Global>>>, Context: Has<Option<AuthData>> + Has<Option<Authorization>> + Has<XSpanIdString> + Clone + 'static + Send,