:doc:`SSOOIDC <../../sso-oidc>` / Client / register_client

***************
register_client
***************



.. py:method:: SSOOIDC.Client.register_client(**kwargs)

  

  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.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClient>`_  


  **Request Syntax**
  ::

    response = client.register_client(
        clientName='string',
        clientType='string',
        scopes=[
            'string',
        ],
        redirectUris=[
            'string',
        ],
        grantTypes=[
            'string',
        ],
        issuerUrl='string',
        entitledApplicationArn='string'
    )
    
  :type clientName: string
  :param clientName: **[REQUIRED]** 

    The friendly name of the client.

    

  
  :type clientType: string
  :param clientType: **[REQUIRED]** 

    The type of client. The service supports only ``public`` as a client type. Anything other than public will be rejected by the service.

    

  
  :type scopes: list
  :param scopes: 

    The list of scopes that are defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.

    

  
    - *(string) --* 

    

  :type redirectUris: list
  :param redirectUris: 

    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.

    

  
    - *(string) --* 

    

  :type grantTypes: list
  :param grantTypes: 

    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``

    

  
    - *(string) --* 

    

  :type issuerUrl: string
  :param issuerUrl: 

    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.

    

  
  :type entitledApplicationArn: string
  :param entitledApplicationArn: 

    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.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'clientId': 'string',
          'clientSecret': 'string',
          'clientIdIssuedAt': 123,
          'clientSecretExpiresAt': 123,
          'authorizationEndpoint': 'string',
          'tokenEndpoint': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **clientId** *(string) --* 

        The unique identifier string for each client. This client uses this identifier to get authenticated by the service in subsequent calls.

        
      

      - **clientSecret** *(string) --* 

        A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls.

        
      

      - **clientIdIssuedAt** *(integer) --* 

        Indicates the time at which the ``clientId`` and ``clientSecret`` were issued.

        
      

      - **clientSecretExpiresAt** *(integer) --* 

        Indicates the time at which the ``clientId`` and ``clientSecret`` will become invalid.

        
      

      - **authorizationEndpoint** *(string) --* 

        An endpoint that the client can use to request authorization.

        
      

      - **tokenEndpoint** *(string) --* 

        An endpoint that the client can use to create tokens.

        
  
  **Exceptions**
  
  *   :py:class:`SSOOIDC.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`SSOOIDC.Client.exceptions.InvalidScopeException`

  
  *   :py:class:`SSOOIDC.Client.exceptions.InvalidClientMetadataException`

  
  *   :py:class:`SSOOIDC.Client.exceptions.InternalServerException`

  
  *   :py:class:`SSOOIDC.Client.exceptions.InvalidRedirectUriException`

  
  *   :py:class:`SSOOIDC.Client.exceptions.UnsupportedGrantTypeException`

  
  *   :py:class:`SSOOIDC.Client.exceptions.SlowDownException`

  