register_client
¶
register_client(
client_name: ClientName,
client_type: ClientType,
*,
config_overrides: Optional[SSOOIDCClientConfig] = None,
scopes: Optional[Scopes] = None,
redirect_uris: Optional[RedirectUris] = None,
grant_types: Optional[GrantTypes] = None,
issuer_url: Optional[URI] = None,
entitled_application_arn: Optional[ArnType] = None,
) -> RegisterClientResponse
Registers a public client with IAM Identity Center. This allows clients to perform authorization using the authorization code grant with Proof Key for Code Exchange (PKCE) or the device code grant.
Parameters:
-
client_name(ClientName) –The friendly name of the client.
-
client_type(ClientType) –The type of client. The service supports only
publicas a client type. Anything other than public will be rejected by the service. -
scopes(Optional[Scopes], default:None) –The list of scopes that are defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.
-
redirect_uris(Optional[RedirectUris], default:None) –The list of redirect URI that are defined by the client. At completion of authorization, this list is used to restrict what locations the user agent can be redirected back to.
-
grant_types(Optional[GrantTypes], default:None) –The list of OAuth 2.0 grant types that are defined by the client. This list is used to restrict the token granting flows available to the client. Supports the following OAuth 2.0 grant types: Authorization Code, Device Code, and Refresh Token.
* Authorization Code -
authorization_code* Device Code -
urn:ietf:params:oauth:grant-type:device_code* Refresh Token -
refresh_token -
issuer_url(Optional[URI], default:None) –The IAM Identity Center Issuer URL associated with an instance of IAM Identity Center. This value is needed for user access to resources through the client.
-
entitled_application_arn(Optional[ArnType], default:None) –This IAM Identity Center application ARN is used to define administrator-managed configuration for public client access to resources. At authorization, the scopes, grants, and redirect URI available to this client will be restricted by this application resource.
Raises:
-
InternalServerException–Indicates that an error from the service occurred while trying to process a request.
-
InvalidClientMetadataException–Indicates that the client information sent in the request during registration is invalid.
-
InvalidRedirectUriException–Indicates that one or more redirect URI in the request is not supported for this operation.
-
InvalidRequestException–Indicates that something is wrong with the input to the request. For example, a required parameter might be missing or out of range.
-
InvalidScopeException–Indicates that the scope provided in the request is invalid.
-
SlowDownException–Indicates that the client is making the request too frequently and is more than the service can handle.
-
UnsupportedGrantTypeException–Indicates that the grant type in the request is not supported by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Call OAuth/OIDC /register-client endpoint
>>> client.register_client(client_name='My IDE Plugin', client_type='public', scopes=['sso:account:access', 'codewhisperer:completions'], redirect_uris=['127.0.0.1:PORT/oauth/callback'], grant_types=['authorization_code', 'refresh_token'], issuer_url='https://identitycenter.amazonaws.com/ssoins-1111111111111111', entitled_application_arn='arn:aws:sso::ACCOUNTID:application/ssoins-1111111111111111/apl-1111111111111111')
Source code in docs_src/capo_sso_oidc/_services/ssooidc.py
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | |