pub struct Token {
pub audit_ids: Vec<String>,
pub methods: Vec<String>,
pub expires_at: DateTime<Utc>,
pub issued_at: DateTime<Utc>,
pub user: User,
pub domain: Option<Domain>,
pub project: Option<Project>,
pub system: Option<System>,
pub trust: Option<TokenTrustRepr>,
pub roles: Option<Vec<RoleRef>>,
pub catalog: Option<Catalog>,
}Expand description
Authorization token.
Fields§
§audit_ids: Vec<String>A list of one or two audit IDs. An audit ID is a unique, randomly generated, URL-safe string that you can use to track a token. The first audit ID is the current audit ID for the token. The second audit ID is present for only re-scoped tokens and is the audit ID from the token before it was re-scoped. A re- scoped token is one that was exchanged for another token of the same or different scope. You can use these audit IDs to track the use of a token or chain of tokens across multiple requests and endpoints without exposing the token ID to non-privileged users.
methods: Vec<String>The authentication methods, which are commonly password, token, or other methods. Indicates the accumulated set of authentication methods that were used to obtain the token. For example, if the token was obtained by password authentication, it contains password. Later, if the token is exchanged by using the token authentication method one or more times, the subsequently created tokens contain both password and token in their methods attribute. Unlike multi-factor authentication, the methods attribute merely indicates the methods that were used to authenticate the user in exchange for a token. The client is responsible for determining the total number of authentication factors.
expires_at: DateTime<Utc>The date and time when the token expires.
issued_at: DateTime<Utc>The date and time when the token was issued.
user: UserA user object.
domain: Option<Domain>A domain object including the id and name representing the domain the token is scoped to. This is only included in tokens that are scoped to a domain.
project: Option<Project>A project object including the id, name and domain object representing the project the token is scoped to. This is only included in tokens that are scoped to a project.
system: Option<System>A system object.
trust: Option<TokenTrustRepr>A trust object.
roles: Option<Vec<RoleRef>>A list of role objects.
catalog: Option<Catalog>A catalog object.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Token
impl<'de> Deserialize<'de> for Token
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Token, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Token, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Token
impl Serialize for Token
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TryFrom<&Token> for Token
impl TryFrom<&Token> for Token
Source§type Error = BuilderError
type Error = BuilderError
Source§impl<'v_a> ValidateArgs<'v_a> for Token
impl<'v_a> ValidateArgs<'v_a> for Token
type Args = ()
fn validate_with_args( &self, args: <Token as ValidateArgs<'v_a>>::Args, ) -> Result<(), ValidationErrors>
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more