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: InstalledAppId
The app ID to issue a connection token for.
expiry_seconds: u64
The 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 false
, the token will be invalidated after the first use anyway.
Set this to 0 to create a token that does not expire.
single_use: bool
Whether 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 UnwindSafe for IssueAppAuthenticationTokenPayload
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> 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 moresource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.