pub struct HomeserverToken;Available on crate feature
api and (crate features appservice-api-c or appservice-api-s) and (crate features client or server) only.Expand description
Authentication is required, and can only be performed by a homeserver sending a request to an
appservice, by including a homeserver access token in the Authentication http header, or an
access_token query parameter.
Using the query parameter is deprecated since Matrix 1.11.
Trait Implementations§
Source§impl AuthScheme for HomeserverToken
impl AuthScheme for HomeserverToken
Source§type AddAuthenticationError = InvalidHeaderValue
type AddAuthenticationError = InvalidHeaderValue
The error type returned from
add_authentication().Source§type ExtractAuthenticationError = ExtractTokenError
type ExtractAuthenticationError = ExtractTokenError
The error type returned from
extract_authentication().Source§fn add_authentication<T>(
request: &mut Request<T>,
access_token: <HomeserverToken as AuthScheme>::Input<'_>,
) -> Result<(), <HomeserverToken as AuthScheme>::AddAuthenticationError>
fn add_authentication<T>( request: &mut Request<T>, access_token: <HomeserverToken as AuthScheme>::Input<'_>, ) -> Result<(), <HomeserverToken as AuthScheme>::AddAuthenticationError>
Add this authentication scheme to the given outgoing request, if necessary. Read more
Source§fn extract_authentication<T>(
request: &Request<T>,
) -> Result<<HomeserverToken as AuthScheme>::Output, <HomeserverToken as AuthScheme>::ExtractAuthenticationError>
fn extract_authentication<T>( request: &Request<T>, ) -> Result<<HomeserverToken as AuthScheme>::Output, <HomeserverToken as AuthScheme>::ExtractAuthenticationError>
Extract the data of this authentication scheme from the given incoming request. Read more
Source§impl Clone for HomeserverToken
impl Clone for HomeserverToken
Source§fn clone(&self) -> HomeserverToken
fn clone(&self) -> HomeserverToken
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 moreimpl Copy for HomeserverToken
Source§impl Debug for HomeserverToken
impl Debug for HomeserverToken
Source§impl Default for HomeserverToken
impl Default for HomeserverToken
Source§fn default() -> HomeserverToken
fn default() -> HomeserverToken
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HomeserverToken
impl RefUnwindSafe for HomeserverToken
impl Send for HomeserverToken
impl Sync for HomeserverToken
impl Unpin for HomeserverToken
impl UnsafeUnpin for HomeserverToken
impl UnwindSafe for HomeserverToken
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