pub struct TokenResponse {
pub access_token: String,
pub refresh_token: Option<String>,
pub key: Option<String>,
pub private_key: Option<String>,
}Expand description
The token endpoint’s answer for both the password and refresh grants.
Fields§
§access_token: String§refresh_token: Option<String>§key: Option<String>The wrapped user key. Vaultwarden capitalises the field; some clients lower-case it, so both spellings parse.
private_key: Option<String>The wrapped account private key, in the same two spellings.
Trait Implementations§
Source§impl Clone for TokenResponse
impl Clone for TokenResponse
Source§impl Debug for TokenResponse
Hand-written because every field is a credential: the access and refresh
tokens, the wrapped user key and the wrapped private key.
impl Debug for TokenResponse
Hand-written because every field is a credential: the access and refresh tokens, the wrapped user key and the wrapped private key.
Source§impl<'de> Deserialize<'de> for TokenResponse
Hand-written so a malformed response drops every field it had already
read through Zeroizing: the access and refresh tokens are credentials.
impl<'de> Deserialize<'de> for TokenResponse
Hand-written so a malformed response drops every field it had already
read through Zeroizing: the access and refresh tokens are credentials.
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Drop for TokenResponse
Every field is a credential, so dropping the token wipes it even on an
error path that never stored it.
impl Drop for TokenResponse
Every field is a credential, so dropping the token wipes it even on an error path that never stored it.
Auto Trait Implementations§
impl Freeze for TokenResponse
impl RefUnwindSafe for TokenResponse
impl Send for TokenResponse
impl Sync for TokenResponse
impl Unpin for TokenResponse
impl UnsafeUnpin for TokenResponse
impl UnwindSafe for TokenResponse
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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