[−][src]Trait firestore_db_and_auth::FirebaseAuthBearer
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.
Implementors
impl<'a> FirebaseAuthBearer<'a> for firestore_db_and_auth::sessions::service_account::Session
[src]
fn projectid(&'a self) -> &'a str
[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.