Struct rawr::auth::AnonymousAuthenticator [] [src]

pub struct AnonymousAuthenticator;

An anonymous login authenticator.

Methods

impl AnonymousAuthenticator
[src]

fn new() -> Arc<Mutex<Box<Authenticator + Send>>>

Creates a new AnonymousAuthenticator. See the module-level documentation for the purpose of AnonymousAuthenticator.

Examples

use rawr::auth::AnonymousAuthenticator;
AnonymousAuthenticator::new();

Trait Implementations

impl Authenticator for AnonymousAuthenticator
[src]

fn login(&mut self, client: &Client, user_agent: &str) -> Result<(), APIError>

Logs in and fetches relevant tokens.

fn logout(&mut self, client: &Client, user_agent: &str) -> Result<(), APIError>

Logs out and invalidates tokens if applicable.

fn scopes(&self) -> Vec<String>

A list of OAuth scopes that this Authenticator can access. Currently, the result of this is not used, but the correct scopes should be returned. If all scopes can be accessed, this is signified by a vec!["*"]. If it is read-only, the result is vec!["read"]. Read more

fn headers(&self) -> Headers

Returns the headers needed to authenticate. Must be done after login().

fn oauth(&self) -> bool

true if this authentication method requires the OAuth API.

fn refresh_token(&mut self, client: &Client, user_agent: &str) -> Result<(), APIError>

Called if a token expiration error occurs.