pub struct RefreshRequest {
pub access_token: String,
pub client_token: String,
pub request_user: bool,
pub selected_profile: Option<AuthProfile>,
}Expand description
A request struct for refreshing an access token in Yggdrasil’s authentication system.
This struct is used to represent a request to refresh the user’s access token, client token, and optionally request user information or refresh a selected profile.
Fields§
§access_token: StringThe access token to refresh.
client_token: StringThe client token associated with the user.
request_user: boolWhether to request user information in the response.
selected_profile: Option<AuthProfile>The selected profile to refresh, if any. This field is not serialized if it is None.
Implementations§
Source§impl RefreshRequest
impl RefreshRequest
Sourcepub fn new(
access_token: String,
client_token: String,
request_user: bool,
selected_profile: Option<AuthProfile>,
) -> RefreshRequest
pub fn new( access_token: String, client_token: String, request_user: bool, selected_profile: Option<AuthProfile>, ) -> RefreshRequest
Creates a new RefreshRequest with the provided access token, client token, and optionally
the selected profile and a flag indicating whether to request user information.
§Arguments
access_token- The access token to refresh.client_token- The client token associated with the user.request_user- Whether to request user information in the response.selected_profile- An optional profile to refresh. Can beNoneif no profile is selected.
§Returns
A new RefreshRequest instance.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RefreshRequest
impl RefUnwindSafe for RefreshRequest
impl Send for RefreshRequest
impl Sync for RefreshRequest
impl Unpin for RefreshRequest
impl UnwindSafe for RefreshRequest
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more