pub struct Config {
pub client_id: String,
pub client_secret: String,
pub refresh_token: String,
pub access_token: Option<String>,
pub token_refresh_threshold: u64,
pub token_expiry_buffer: u64,
}Fields§
§client_id: String§client_secret: String§refresh_token: String§access_token: Option<String>§token_refresh_threshold: u64Number of seconds before an access token expires that it should be refreshed. Allows for proactive refresh to prevent working with nearly-expired tokens. Can be configured with TOKEN_REFRESH_THRESHOLD_SECONDS environment variable.
token_expiry_buffer: u64Buffer time in seconds subtracted from the token’s expiration time to ensure we don’t use tokens too close to their expiry time. Provides a safety margin. Can be configured with TOKEN_EXPIRY_BUFFER_SECONDS environment variable.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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