pub struct ClientCredentials {
pub client_id: String,
pub refresh_margin: Duration,
pub default_credential_expires_in: Duration,
/* private fields */
}Expand description
Credentials necessary for authentication at the VTN
Fields§
§client_id: String§refresh_margin: DurationMargin to refresh the authentication token with the client_id and client_secret before it expired This is helpful to prevent an “unauthorized” due to small differences in client/server times and network latency
Default: 60 sec
default_credential_expires_in: DurationTime the authorization token is typically valid for.
Default: 3600 sec, i.e., one hour
Implementations§
Source§impl ClientCredentials
impl ClientCredentials
Sourcepub fn new(client_id: String, client_secret: String) -> Self
pub fn new(client_id: String, client_secret: String) -> Self
Creates new ClientCredentials with default values for
refresh_margin and
default_credential_expires_in
(60 and 3600 sec, respectively)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientCredentials
impl RefUnwindSafe for ClientCredentials
impl Send for ClientCredentials
impl Sync for ClientCredentials
impl Unpin for ClientCredentials
impl UnwindSafe for ClientCredentials
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