{"action":"created","issue":{"url":"https://api.github.com/repos/camunda/camunda-external-task-client-js/issues/9","repository_url":"https://api.github.com/repos/camunda/camunda-external-task-client-js","labels_url":"https://api.github.com/repos/camunda/camunda-external-task-client-js/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/camunda/camunda-external-task-client-js/issues/9/comments","events_url":"https://api.github.com/repos/camunda/camunda-external-task-client-js/issues/9/events","html_url":"https://github.com/camunda/camunda-external-task-client-js/issues/9","id":317729566,"number":9,"title":"Bearer Token Interceptor","user":{"login":"aminmc","id":290639,"avatar_url":"https://avatars0.githubusercontent.com/u/290639?v=4","gravatar_id":"","url":"https://api.github.com/users/aminmc","html_url":"https://github.com/aminmc","followers_url":"https://api.github.com/users/aminmc/followers","following_url":"https://api.github.com/users/aminmc/following{/other_user}","gists_url":"https://api.github.com/users/aminmc/gists{/gist_id}","starred_url":"https://api.github.com/users/aminmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aminmc/subscriptions","organizations_url":"https://api.github.com/users/aminmc/orgs","repos_url":"https://api.github.com/users/aminmc/repos","events_url":"https://api.github.com/users/aminmc/events{/privacy}","received_events_url":"https://api.github.com/users/aminmc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-25T17:48:07Z","updated_at":"2018-04-26T13:11:10Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nIs it possible to create a bearer token interceptor instead of a basic auth? I'm thinking of implementing a version that makes a request to keycloak and then gets a token which I would then like to pass onto Camunda REST API. Just wanted to check if this was feasible as the request to get a token would be a promise.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/camunda/camunda-external-task-client-js/issues/comments/384635477","html_url":"https://github.com/camunda/camunda-external-task-client-js/issues/9#issuecomment-384635477","issue_url":"https://api.github.com/repos/camunda/camunda-external-task-client-js/issues/9","id":384635477,"user":{"login":"siffogh","id":4761023,"avatar_url":"https://avatars3.githubusercontent.com/u/4761023?v=4","gravatar_id":"","url":"https://api.github.com/users/siffogh","html_url":"https://github.com/siffogh","followers_url":"https://api.github.com/users/siffogh/followers","following_url":"https://api.github.com/users/siffogh/following{/other_user}","gists_url":"https://api.github.com/users/siffogh/gists{/gist_id}","starred_url":"https://api.github.com/users/siffogh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siffogh/subscriptions","organizations_url":"https://api.github.com/users/siffogh/orgs","repos_url":"https://api.github.com/users/siffogh/repos","events_url":"https://api.github.com/users/siffogh/events{/privacy}","received_events_url":"https://api.github.com/users/siffogh/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T13:11:10Z","updated_at":"2018-04-26T13:11:10Z","author_association":"CONTRIBUTOR","body":"Hi @aminmc, you can create [an interceptor function](https://github.com/camunda/camunda-external-task-client-js/blob/master/docs/Client.md#about-interceptors) to do so.\r\n\r\nIt doesn't really matter if the request is a asynchronous. You can make the request, get the token and then initialise your Client. The interceptor can use that token you got from the request (could be passed to it through some config option) and add it to the header of every request."}}
{"actor":{"display_login":"siffogh"}}