[][src]Trait firestore_db_and_auth::FirebaseAuthBearer

pub trait FirebaseAuthBearer<'a> {
    fn projectid(&'a self) -> &'a str;
fn bearer(&'a self) -> String; }

Authentication trait.

This trait is implemented by crate::sessions, but you do not need those for using the Firestore API of this crate. Firestore document methods in crate::documents expect an object that implements the FirebaseAuthBearer trait.

Implement this trait for your own data structure and provide the Firestore project id and a valid access token.

Required methods

fn projectid(&'a self) -> &'a str

Return the project ID. This is required for the firebase REST API.

fn bearer(&'a self) -> String

An access token, preferably valid.

Loading content...

Implementors

impl<'a> FirebaseAuthBearer<'a> for firestore_db_and_auth::sessions::service_account::Session[src]

fn bearer(&'a self) -> String[src]

Return the encoded jwt to be used as bearer token. If the jwt issue_at is older than 50 mins, it will be updated to the current time.

impl<'a> FirebaseAuthBearer<'a> for firestore_db_and_auth::sessions::user::Session[src]

Loading content...