pub struct GenerateTokenParams {
pub api_key: String,
pub secret_key: String,
pub permissions: Option<Vec<String>>,
pub roles: Option<Vec<String>>,
pub version: Option<i64>,
pub expires_in: Option<Duration>,
pub claims: Map<String, Value>,
}Expand description
Configures generate_token.
Fields§
§api_key: StringThe project API key (public). Embedded in the payload as apikey. Required.
secret_key: StringThe project secret (private). HS256-signs the token; never transmitted. Required.
permissions: Option<Vec<String>>Permission claims. Defaults to ["allow_join", "allow_mod"].
roles: Option<Vec<String>>Role claims. Defaults to ["crawler"], which the v2 REST APIs require for
management requests.
version: Option<i64>The token version. Defaults to 2, which the v2 REST APIs require.
expires_in: Option<Duration>The token lifetime. Defaults to DEFAULT_TOKEN_TTL.
claims: Map<String, Value>Extra custom claims merged into the payload, e.g. participantId, roomId.
Custom claims may shadow apikey, permissions, version and roles,
but never iat or exp.
Trait Implementations§
Source§impl Clone for GenerateTokenParams
impl Clone for GenerateTokenParams
Source§fn clone(&self) -> GenerateTokenParams
fn clone(&self) -> GenerateTokenParams
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 moreSource§impl Debug for GenerateTokenParams
impl Debug for GenerateTokenParams
Source§impl Default for GenerateTokenParams
impl Default for GenerateTokenParams
Source§fn default() -> GenerateTokenParams
fn default() -> GenerateTokenParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GenerateTokenParams
impl RefUnwindSafe for GenerateTokenParams
impl Send for GenerateTokenParams
impl Sync for GenerateTokenParams
impl Unpin for GenerateTokenParams
impl UnsafeUnpin for GenerateTokenParams
impl UnwindSafe for GenerateTokenParams
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