camunda-community-hub / camunda-external-task-client-python3

Camunda 7 External Task Client in Python
Apache License 2.0
73 stars 54 forks source link

feat: added bearer token/oauth2session support #89

Closed danbailo closed 1 year ago

danbailo commented 1 year ago

This PR implements the authorization using bearer token.

The user only should pass the access token to client property.

When the request object is an OAuth2Session

client = ExternalTaskClient(worker_id=1)
client.config.update({'auth_bearer': oauth2session.token})
CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

yogeshrnaik commented 1 year ago

Please fix failing test cases

=========================== short test summary info ============================
ERROR camunda/client/tests/test_engine_client.py - TypeError: 'type' object is not subscriptable
ERROR camunda/client/tests/test_engine_client_auth.py - TypeError: 'type' object is not subscriptable
ERROR camunda/client/tests/test_engine_client_bearer.py - TypeError: 'type' object is not subscriptable
ERROR camunda/client/tests/test_external_task_client.py - TypeError: 'type' object is not subscriptable
ERROR camunda/client/tests/test_external_task_client_auth.py - TypeError: 'type' object is not subscriptable
ERROR camunda/client/tests/test_external_task_client_bearer.py - TypeError: 'type' object is not subscriptable
ERROR camunda/external_task/tests/test_external_task_executor.py - TypeError: 'type' object is not subscriptable
ERROR camunda/external_task/tests/test_external_task_worker.py - TypeError: 'type' object is not subscriptable
ERROR camunda/process_definition/tests/test_process_definition_client.py - TypeError: 'type' object is not subscriptable
ERROR camunda/utils/tests/test_auth_bearer.py - TypeError: 'type' object is not subscriptable
!!!!!!!!!!!!!!!!!!! Interrupted: 10 errors during collection !!!!!!!!!!!!!!!!!!!
danbailo commented 1 year ago

solved @yogeshrnaik , was a problem with typehinting because old python version.