def sign_up()

in src/services/clients/cognito.py [0:0]


    def sign_up(self, username: str, password: str, role: str | None = None,
                customer: str | None = None, is_system: bool = False):
        custom_attr = [{
            'Name': 'name',
            'Value': username
        }]
        if role:
            custom_attr.append({
                'Name': CUSTOM_ROLE_ATTR,
                'Value': role
            })
        if customer:
            custom_attr.append({
                'Name': CUSTOM_CUSTOMER,
                'Value': customer
            })
        if isinstance(is_system, bool):
            custom_attr.append({
                'Name': CUSTOM_IS_SYSTEM,
                'Value': is_system
            })
        validation_data = [
            {
                'Name': 'name',
                'Value': username
            }
        ]
        return self.client.sign_up(ClientId=self.client_id,
                                   Username=username,
                                   Password=password,
                                   UserAttributes=custom_attr,
                                   ValidationData=validation_data)