pub struct TokenBuilder { /* private fields */ }Expand description
Builder for Token.
Implementations§
Source§impl TokenBuilder
impl TokenBuilder
Sourcepub fn audit_ids<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
pub fn audit_ids<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
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.
Sourcepub fn methods<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
pub fn methods<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
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.
Sourcepub fn expires_at<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
pub fn expires_at<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
The date and time when the token expires.
Sourcepub fn issued_at<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
pub fn issued_at<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
The date and time when the token was issued.
Sourcepub fn user<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
pub fn user<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
A user object.
Sourcepub fn domain<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
pub fn domain<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
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.
Sourcepub fn project<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
pub fn project<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
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.
Sourcepub fn trust<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilderwhere
VALUE: Into<TokenTrustRepr>,
pub fn trust<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilderwhere
VALUE: Into<TokenTrustRepr>,
A trust object.
Sourcepub fn roles<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
pub fn roles<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
A list of role objects.
Sourcepub fn system<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
pub fn system<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
A system object.
Sourcepub fn catalog<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
pub fn catalog<VALUE>(&mut self, value: VALUE) -> &mut TokenBuilder
A catalog object.
Trait Implementations§
Source§impl Clone for TokenBuilder
impl Clone for TokenBuilder
Source§fn clone(&self) -> TokenBuilder
fn clone(&self) -> TokenBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for TokenBuilder
impl Default for TokenBuilder
Source§fn default() -> TokenBuilder
fn default() -> TokenBuilder
Auto Trait Implementations§
impl Freeze for TokenBuilder
impl RefUnwindSafe for TokenBuilder
impl Send for TokenBuilder
impl Sync for TokenBuilder
impl Unpin for TokenBuilder
impl UnsafeUnpin for TokenBuilder
impl UnwindSafe for TokenBuilder
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