pub struct TokenDetails {
pub token: String,
pub key_name: Option<String>,
pub issued: Option<i64>,
pub expires: Option<i64>,
pub capability: Option<String>,
pub client_id: Option<String>,
}Expand description
TokenDetails : An issued Ably Token. The token string is presented as a Bearer credential.
Fields§
§token: StringThe token string, sent as Authorization: Bearer <token>.
key_name: Option<String>The API key name the token was issued from.
issued: Option<i64>Milliseconds since the Unix epoch at which the token was issued.
expires: Option<i64>Milliseconds since the Unix epoch at which the token expires.
capability: Option<String>A capability document as a JSON string (a stringified object mapping resource-name patterns to arrays of operations, e.g. {\"my-room\":[\"publish\",\"history\"]}). For a signed TokenRequest this string must be canonicalized (resource keys and operation arrays sorted, no whitespace) because it is part of the HMAC-signed text. See SPEC §13.
client_id: Option<String>The identity bound to the token, if any.
Implementations§
Source§impl TokenDetails
impl TokenDetails
Sourcepub fn new(token: String) -> TokenDetails
pub fn new(token: String) -> TokenDetails
An issued Ably Token. The token string is presented as a Bearer credential.
Trait Implementations§
Source§impl Clone for TokenDetails
impl Clone for TokenDetails
Source§fn clone(&self) -> TokenDetails
fn clone(&self) -> TokenDetails
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more