pub struct IssueAppAuthenticationTokenPayload {
pub installed_app_id: InstalledAppId,
pub expiry_seconds: u64,
pub single_use: bool,
}Expand description
Request payload for AdminRequest::IssueAppAuthenticationToken.
Fields§
§installed_app_id: InstalledAppIdThe app ID to issue a connection token for.
expiry_seconds: u64The number of seconds that the token should be valid for. After this number of seconds, the token will no longer be accepted by the conductor.
This is 30s by default which is reasonably high but with IssueAppAuthenticationTokenPayload::single_use
set to true, the token will be invalidated after the first use anyway.
Set this to 0 to create a token that does not expire.
single_use: boolWhether the token should be single-use. This is true by default and will cause the token
to be invalidated after the first use, irrespective of connection success.
Set this to false to allow the token to be used multiple times.
Implementations§
Source§impl IssueAppAuthenticationTokenPayload
impl IssueAppAuthenticationTokenPayload
Sourcepub fn for_installed_app_id(installed_app_id: InstalledAppId) -> Self
pub fn for_installed_app_id(installed_app_id: InstalledAppId) -> Self
Create a new payload for issuing a connection token for the specified app.
The token will be valid for 30 seconds and for a single use.
Sourcepub fn expiry_seconds(self, expiry_seconds: u64) -> Self
pub fn expiry_seconds(self, expiry_seconds: u64) -> Self
Set the expiry time for the token.
Sourcepub fn single_use(self, single_use: bool) -> Self
pub fn single_use(self, single_use: bool) -> Self
Set whether the token should be single-use.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IssueAppAuthenticationTokenPayload
impl<'de> Deserialize<'de> for IssueAppAuthenticationTokenPayload
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>,
Source§impl From<String> for IssueAppAuthenticationTokenPayload
impl From<String> for IssueAppAuthenticationTokenPayload
Source§fn from(installed_app_id: InstalledAppId) -> Self
fn from(installed_app_id: InstalledAppId) -> Self
Auto Trait Implementations§
impl Freeze for IssueAppAuthenticationTokenPayload
impl RefUnwindSafe for IssueAppAuthenticationTokenPayload
impl Send for IssueAppAuthenticationTokenPayload
impl Sync for IssueAppAuthenticationTokenPayload
impl Unpin for IssueAppAuthenticationTokenPayload
impl UnsafeUnpin for IssueAppAuthenticationTokenPayload
impl UnwindSafe for IssueAppAuthenticationTokenPayload
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more