getJwks method

Future<GoogleIdentityStsV1Jwks> getJwks(
  1. String name, {
  2. String? $fields,
})

Fetches the signing keys for an agentic or managed workload identity pool and returns them in JWKs format, defined in RFC 7517.

For now, only agentic system pools are supported. Preview This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see the launch stage descriptions.

Request parameters:

name - Required. The name of the pool whose JWKS needs to be retrieved. Format: 'organizations/{ORGANIZATION_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}' 'projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}' Example(s): 'organizations/1234/locations/global/workloadIdentityPools/agents.global.org-1234.system.id.goog' 'projects/12345678/locations/global/workloadIdentityPools/agents.global.proj-12345678.system.id.goog' Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/workloadIdentityPools/\[^/\]+$.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleIdentityStsV1Jwks.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<GoogleIdentityStsV1Jwks> getJwks(
  core.String name, {
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/openid/jwks';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return GoogleIdentityStsV1Jwks.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}