pub struct IdentityAwareProxyOAuthService { /* private fields */ }Expand description
Implements a client for the Cloud Identity-Aware Proxy API.
§Example
let client = IdentityAwareProxyOAuthService::builder().build().await?;
// use `client` to make requests to the Cloud Identity-Aware Proxy API.§Service Description
API to programmatically create, list and retrieve Identity Aware Proxy (IAP) OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth clients.
§Configuration
To configure IdentityAwareProxyOAuthService use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://iap.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
IdentityAwareProxyOAuthService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap IdentityAwareProxyOAuthService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl IdentityAwareProxyOAuthService
impl IdentityAwareProxyOAuthService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for IdentityAwareProxyOAuthService.
let client = IdentityAwareProxyOAuthService::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: IdentityAwareProxyOAuthService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: IdentityAwareProxyOAuthService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn list_brands(&self) -> ListBrands
pub fn list_brands(&self) -> ListBrands
Lists the existing brands for the project.
Sourcepub fn create_brand(&self) -> CreateBrand
pub fn create_brand(&self) -> CreateBrand
Constructs a new OAuth brand for the project if one does not exist. The created brand is “internal only”, meaning that OAuth clients created under it only accept requests from users who belong to the same Google Workspace organization as the project. The brand is created in an un-reviewed status. NOTE: The “internal only” status can be manually changed in the Google Cloud Console. Requires that a brand does not already exist for the project, and that the specified support email is owned by the caller.
Sourcepub fn create_identity_aware_proxy_client(
&self,
) -> CreateIdentityAwareProxyClient
pub fn create_identity_aware_proxy_client( &self, ) -> CreateIdentityAwareProxyClient
Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned by IAP. Requires that the brand for the project exists and that it is set for internal-only use.
Sourcepub fn list_identity_aware_proxy_clients(&self) -> ListIdentityAwareProxyClients
pub fn list_identity_aware_proxy_clients(&self) -> ListIdentityAwareProxyClients
Lists the existing clients for the brand.
Sourcepub fn get_identity_aware_proxy_client(&self) -> GetIdentityAwareProxyClient
pub fn get_identity_aware_proxy_client(&self) -> GetIdentityAwareProxyClient
Retrieves an Identity Aware Proxy (IAP) OAuth client. Requires that the client is owned by IAP.
Sourcepub fn reset_identity_aware_proxy_client_secret(
&self,
) -> ResetIdentityAwareProxyClientSecret
pub fn reset_identity_aware_proxy_client_secret( &self, ) -> ResetIdentityAwareProxyClientSecret
Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the secret was compromised. Requires that the client is owned by IAP.
Sourcepub fn delete_identity_aware_proxy_client(
&self,
) -> DeleteIdentityAwareProxyClient
pub fn delete_identity_aware_proxy_client( &self, ) -> DeleteIdentityAwareProxyClient
Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing obsolete clients, managing the number of clients in a given project, and cleaning up after tests. Requires that the client is owned by IAP.
Trait Implementations§
Source§impl Clone for IdentityAwareProxyOAuthService
impl Clone for IdentityAwareProxyOAuthService
Source§fn clone(&self) -> IdentityAwareProxyOAuthService
fn clone(&self) -> IdentityAwareProxyOAuthService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more