/*!
@page iam-override-authentication How to Override the Authentication Credentials

Unless otherwise configured, the client libraries use
[Application Default Credentials] to authenticate with Google Cloud Services.
While this works for most applications, in some cases you may need to override
this default. You can do so by providing the
[UnifiedCredentialsOption](@ref google::cloud::UnifiedCredentialsOption)
The following example shows how to explicitly load a service account key file:

<!-- inject-service-account-snippet-start -->
@snippet iam_client_samples.cc with-service-account

Follow these links to find examples for other \c *Client classes:

- [\c iam_admin_v1::IAMClient](@ref iam_admin_v1::IAMClient-service-account-snippet)
- [\c iam_credentials_v1::IAMCredentialsClient](@ref iam_credentials_v1::IAMCredentialsClient-service-account-snippet)
- [\c iam_v1::IAMPolicyClient](@ref iam_v1::IAMPolicyClient-service-account-snippet)
- [\c iam_v2::PoliciesClient](@ref iam_v2::PoliciesClient-service-account-snippet)
- [\c iam_v3::PolicyBindingsClient](@ref iam_v3::PolicyBindingsClient-service-account-snippet)
- [\c iam_v3::PrincipalAccessBoundaryPoliciesClient](@ref iam_v3::PrincipalAccessBoundaryPoliciesClient-service-account-snippet)

<!-- inject-service-account-snippet-end -->

Keep in mind that we chose this as an example because it is relatively easy to
understand. Consult the [Best practices for managing service account keys]
guide for more details.

@see @ref guac - for more information on the factory functions to create
`google::cloud::Credentials` objects.

[Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys
[Application Default Credentials]: https://cloud.google.com/docs/authentication#adc

*/

// <!-- inject-authentication-pages-start -->

/*! @page iam_admin_v1::IAMClient-service-account-snippet Override iam_admin_v1::IAMClient Authentication Defaults

@snippet google/cloud/iam/admin/v1/samples/iam_client_samples.cc with-service-account

*/

/*! @page iam_credentials_v1::IAMCredentialsClient-service-account-snippet Override iam_credentials_v1::IAMCredentialsClient Authentication Defaults

@snippet google/cloud/iam/credentials/v1/samples/iam_credentials_client_samples.cc with-service-account

*/

/*! @page iam_v1::IAMPolicyClient-service-account-snippet Override iam_v1::IAMPolicyClient Authentication Defaults

@snippet google/cloud/iam/v1/samples/iam_policy_client_samples.cc with-service-account

*/

/*! @page iam_v2::PoliciesClient-service-account-snippet Override iam_v2::PoliciesClient Authentication Defaults

@snippet google/cloud/iam/v2/samples/policies_client_samples.cc with-service-account

*/

/*! @page iam_v3::PolicyBindingsClient-service-account-snippet Override iam_v3::PolicyBindingsClient Authentication Defaults

@snippet google/cloud/iam/v3/samples/policy_bindings_client_samples.cc with-service-account

*/

/*! @page iam_v3::PrincipalAccessBoundaryPoliciesClient-service-account-snippet Override iam_v3::PrincipalAccessBoundaryPoliciesClient Authentication Defaults

@snippet google/cloud/iam/v3/samples/principal_access_boundary_policies_client_samples.cc with-service-account

*/
// <!-- inject-authentication-pages-end -->
