public sealed class IAMCredentialsClientImpl : IAMCredentialsClient
Reference documentation and code samples for the IAM Service Account Credentials v1 API class IAMCredentialsClientImpl.
IAMCredentials client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Iam.Credentials.V1Assembly
Google.Cloud.Iam.Credentials.V1.dll
Remarks
A service account is a special type of Google account that belongs to your application or a virtual machine (VM), instead of to an individual end user. Your application assumes the identity of the service account to call Google APIs, so that the users aren't directly involved.
Service account credentials are used to temporarily assume the identity of the service account. Supported credential types include OAuth 2.0 access tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and more.
Constructors
IAMCredentialsClientImpl(IAMCredentialsClient, IAMCredentialsSettings, ILogger)
public IAMCredentialsClientImpl(IAMCredentials.IAMCredentialsClient grpcClient, IAMCredentialsSettings settings, ILogger logger)
Constructs a client wrapper for the IAMCredentials service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient |
IAMCredentialsIAMCredentialsClient The underlying gRPC client. |
settings |
IAMCredentialsSettings The base IAMCredentialsSettings used within this client. |
logger |
ILogger Optional ILogger to use within this client. |
Properties
GrpcClient
public override IAMCredentials.IAMCredentialsClient GrpcClient { get; }
The underlying gRPC IAMCredentials client
Property Value | |
---|---|
Type | Description |
IAMCredentialsIAMCredentialsClient |
Methods
GenerateAccessToken(GenerateAccessTokenRequest, CallSettings)
public override GenerateAccessTokenResponse GenerateAccessToken(GenerateAccessTokenRequest request, CallSettings callSettings = null)
Generates an OAuth 2.0 access token for a service account.
Parameters | |
---|---|
Name | Description |
request |
GenerateAccessTokenRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
GenerateAccessTokenResponse |
The RPC response. |
GenerateAccessTokenAsync(GenerateAccessTokenRequest, CallSettings)
public override Task<GenerateAccessTokenResponse> GenerateAccessTokenAsync(GenerateAccessTokenRequest request, CallSettings callSettings = null)
Generates an OAuth 2.0 access token for a service account.
Parameters | |
---|---|
Name | Description |
request |
GenerateAccessTokenRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGenerateAccessTokenResponse |
A Task containing the RPC response. |
GenerateIdToken(GenerateIdTokenRequest, CallSettings)
public override GenerateIdTokenResponse GenerateIdToken(GenerateIdTokenRequest request, CallSettings callSettings = null)
Generates an OpenID Connect ID token for a service account.
Parameters | |
---|---|
Name | Description |
request |
GenerateIdTokenRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
GenerateIdTokenResponse |
The RPC response. |
GenerateIdTokenAsync(GenerateIdTokenRequest, CallSettings)
public override Task<GenerateIdTokenResponse> GenerateIdTokenAsync(GenerateIdTokenRequest request, CallSettings callSettings = null)
Generates an OpenID Connect ID token for a service account.
Parameters | |
---|---|
Name | Description |
request |
GenerateIdTokenRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGenerateIdTokenResponse |
A Task containing the RPC response. |
SignBlob(SignBlobRequest, CallSettings)
public override SignBlobResponse SignBlob(SignBlobRequest request, CallSettings callSettings = null)
Signs a blob using a service account's system-managed private key.
Parameters | |
---|---|
Name | Description |
request |
SignBlobRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SignBlobResponse |
The RPC response. |
SignBlobAsync(SignBlobRequest, CallSettings)
public override Task<SignBlobResponse> SignBlobAsync(SignBlobRequest request, CallSettings callSettings = null)
Signs a blob using a service account's system-managed private key.
Parameters | |
---|---|
Name | Description |
request |
SignBlobRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSignBlobResponse |
A Task containing the RPC response. |
SignJwt(SignJwtRequest, CallSettings)
public override SignJwtResponse SignJwt(SignJwtRequest request, CallSettings callSettings = null)
Signs a JWT using a service account's system-managed private key.
Parameters | |
---|---|
Name | Description |
request |
SignJwtRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SignJwtResponse |
The RPC response. |
SignJwtAsync(SignJwtRequest, CallSettings)
public override Task<SignJwtResponse> SignJwtAsync(SignJwtRequest request, CallSettings callSettings = null)
Signs a JWT using a service account's system-managed private key.
Parameters | |
---|---|
Name | Description |
request |
SignJwtRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSignJwtResponse |
A Task containing the RPC response. |