Struct tame_oauth::gcp::EndUserCredentials
source · [−]pub struct EndUserCredentials {
pub client_id: String,
pub client_secret: String,
pub refresh_token: String,
pub client_type: String,
}
Expand description
Provides tokens using default application credentials
Fields
client_id: String
The OAuth2 client_id
client_secret: String
The OAuth2 client_secret
refresh_token: String
The OAuth2 refresh_token
client_type: String
The client type (the value must be authorized_user)
Implementations
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
fn get_token_with_subject<'a, S, I, T>(
&self,
subject: Option<T>,
_scopes: I
) -> Result<TokenOrRequest, Error> where
S: AsRef<str> + 'a,
I: IntoIterator<Item = &'a S>,
T: Into<String>,
fn get_token_with_subject<'a, S, I, T>(
&self,
subject: Option<T>,
_scopes: I
) -> Result<TokenOrRequest, Error> where
S: AsRef<str> + 'a,
I: IntoIterator<Item = &'a S>,
T: Into<String>,
Like TokenProvider::get_token
, but allows the JWT
“subject”
to be passed in. Read more
Once a response has been received for a token request, call this method to deserialize the token (and potentially store it in a local cache for reuse until it expires). Read more
fn get_token<'a, S, I>(&self, scopes: I) -> Result<TokenOrRequest, Error> where
S: AsRef<str> + 'a,
I: IntoIterator<Item = &'a S>,
fn get_token<'a, S, I>(&self, scopes: I) -> Result<TokenOrRequest, Error> where
S: AsRef<str> + 'a,
I: IntoIterator<Item = &'a S>,
Attempts to retrieve a token that can be used in an API request, if we haven’t already retrieved a token for the specified scopes, or the token has expired, an HTTP request is returned that can be used to retrieve a token. Read more
Auto Trait Implementations
impl RefUnwindSafe for EndUserCredentials
impl Send for EndUserCredentials
impl Sync for EndUserCredentials
impl Unpin for EndUserCredentials
impl UnwindSafe for EndUserCredentials
Blanket Implementations
Mutably borrows from an owned value. Read more