Struct fractal_api::oauth::AccessToken
[−]
[src]
pub struct AccessToken { // some fields omitted }
Struct representing an access token.
Methods
impl AccessToken
[src]
fn from_data(app_id: String, scopes: Vec<Scope>, access_token: String, expiration: DateTime<UTC>) -> AccessToken
Creates an access token from stored data.
fn get_app_id(&self) -> &str
Gets the application ID of the token.
fn scopes(&self) -> Iter<Scope>
Gets an iterator through the scopes of the token.
fn get_token(&self) -> Bearer
Gets the token to be sent
fn get_expiration(&self) -> DateTime<UTC>
Gets the expiration time of the token.
fn has_expired(&self) -> bool
Returns wether the access token expired or not.
Trait Implementations
impl Debug for AccessToken
[src]
impl Clone for AccessToken
[src]
fn clone(&self) -> AccessToken
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl FromDTO<AccessTokenDTO> for AccessToken
[src]
fn from_dto(dto: AccessTokenDTO) -> StdResult<AccessToken, FromDTOError>
the from dto wrapper