pub struct Authorization(pub Credentials);
Expand description
Authorization
header, defined in RFC7235
The Authorization
header field allows a user agent to authenticate
itself with an origin server – usually, but not necessarily, after
receiving a 401 (Unauthorized) response. Its value consists of
credentials containing the authentication information of the user
agent for the realm of the resource being requested.
§ABNF
Authorization = credentials
§Example values
Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Bearer fpKL54jvWmEGVoRdCNjG
Tuple Fields§
§0: Credentials
Methods from Deref<Target = Credentials>§
Trait Implementations§
Source§impl Clone for Authorization
impl Clone for Authorization
Source§fn clone(&self) -> Authorization
fn clone(&self) -> Authorization
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Authorization
impl Debug for Authorization
Source§impl Deref for Authorization
impl Deref for Authorization
Source§type Target = Credentials
type Target = Credentials
The resulting type after dereferencing.
Source§fn deref(&self) -> &Credentials
fn deref(&self) -> &Credentials
Dereferences the value.
Source§impl DerefMut for Authorization
impl DerefMut for Authorization
Source§fn deref_mut(&mut self) -> &mut Credentials
fn deref_mut(&mut self) -> &mut Credentials
Mutably dereferences the value.
Source§impl Header for Authorization
impl Header for Authorization
Source§fn name() -> &'static HeaderName
fn name() -> &'static HeaderName
Returns the name of this header. Read more
Source§fn from_values(
values: &mut ValueIter<'_, HeaderValue>,
) -> Result<Option<Authorization>, Error>
fn from_values( values: &mut ValueIter<'_, HeaderValue>, ) -> Result<Option<Authorization>, Error>
Parses the header from the raw value bytes. Read more
Source§impl PartialEq for Authorization
impl PartialEq for Authorization
impl StructuralPartialEq for Authorization
Auto Trait Implementations§
impl Freeze for Authorization
impl RefUnwindSafe for Authorization
impl Send for Authorization
impl Sync for Authorization
impl Unpin for Authorization
impl UnwindSafe for Authorization
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