Struct tame_oauth::gcp::end_user::EndUserCredentialsInner
source · pub struct EndUserCredentialsInner { /* private fields */ }Expand description
A token provider for
default application credentials
Should not be used directly as it is not cached. Use EndUserCredentials instead.
Implementations§
source§impl EndUserCredentialsInner
impl EndUserCredentialsInner
pub fn new(info: EndUserCredentialsInfo) -> Self
Trait Implementations§
source§impl Debug for EndUserCredentialsInner
impl Debug for EndUserCredentialsInner
source§impl IdTokenProvider for EndUserCredentialsInner
impl IdTokenProvider for EndUserCredentialsInner
source§fn get_id_token(&self, _audience: &str) -> Result<IdTokenOrRequest, Error>
fn get_id_token(&self, _audience: &str) -> Result<IdTokenOrRequest, Error>
Attempts to retrieve an id token that can be used when communicating via IAP etc.
source§fn get_id_token_with_access_token<S>(
&self,
_audience: &str,
_response: AccessTokenResponse<S>
) -> Result<IdTokenRequest, Error>where
S: AsRef<[u8]>,
fn get_id_token_with_access_token<S>( &self, _audience: &str, _response: AccessTokenResponse<S> ) -> Result<IdTokenRequest, Error>where S: AsRef<[u8]>,
Some token sources require a access token to be used to generte a id token.
If
get_id_token returns a AccessTokenResponse, this method should be called.source§fn parse_id_token_response<S>(
&self,
_hash: u64,
response: IdTokenResponse<S>
) -> Result<IdToken, Error>where
S: AsRef<[u8]>,
fn parse_id_token_response<S>( &self, _hash: u64, response: IdTokenResponse<S> ) -> Result<IdToken, Error>where S: AsRef<[u8]>,
Once a
IdTokenResponse has been received for an id token request, call this method
to deserialize the token.source§impl TokenProvider for EndUserCredentialsInner
impl TokenProvider for EndUserCredentialsInner
source§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.source§fn parse_token_response<S>(
&self,
_hash: u64,
response: Response<S>
) -> Result<Token, Error>where
S: AsRef<[u8]>,
fn parse_token_response<S>( &self, _hash: u64, response: Response<S> ) -> Result<Token, Error>where S: AsRef<[u8]>,
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).
source§fn get_token<'a, S, I>(&self, scopes: I) -> Result<TokenOrRequest, Error>where
S: AsRef<str> + 'a,
I: IntoIterator<Item = &'a S> + Clone,
fn get_token<'a, S, I>(&self, scopes: I) -> Result<TokenOrRequest, Error>where S: AsRef<str> + 'a, I: IntoIterator<Item = &'a S> + Clone,
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 EndUserCredentialsInner
impl Send for EndUserCredentialsInner
impl Sync for EndUserCredentialsInner
impl Unpin for EndUserCredentialsInner
impl UnwindSafe for EndUserCredentialsInner
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more