pub struct AuthPayload {
pub jwt: SecretString,
pub channel: Option<String>,
}Expand description
The client’s bearer JWT, carried in the clear (JWTs are only base64url
encoded, not encrypted) as SecretString so it auto-redacts from Debug
and zeroizes on drop instead of lingering in process memory as a plain
String.
Every embedder of crate::host::ProtocolCore (browser, native, or test
host) plays the client role and needs to serialize this payload to send
its own token, which the client feature (on by default) provides.
The one consumer that only ever decodes an AuthPayload it received is
the SFU server itself, whose own dependency on this crate disables
default features, so its build never compiles in the capability to
serialize this type at all.
Fields§
§jwt: SecretString§channel: Option<String>Trait Implementations§
Source§impl Clone for AuthPayload
impl Clone for AuthPayload
Source§fn clone(&self) -> AuthPayload
fn clone(&self) -> AuthPayload
Returns a duplicate 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 AuthPayload
impl Debug for AuthPayload
Source§impl<'de> Deserialize<'de> for AuthPayload
impl<'de> Deserialize<'de> for AuthPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AuthPayload
impl PartialEq for AuthPayload
Source§impl Serialize for AuthPayload
Available on crate feature client only.
impl Serialize for AuthPayload
Available on crate feature
client only.impl Eq for AuthPayload
Auto Trait Implementations§
impl Freeze for AuthPayload
impl RefUnwindSafe for AuthPayload
impl Send for AuthPayload
impl Sync for AuthPayload
impl Unpin for AuthPayload
impl UnsafeUnpin for AuthPayload
impl UnwindSafe for AuthPayload
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