uber-go / cadence-client

Framework for authoring workflows and activities running on top of the Cadence orchestration engine.
https://cadenceworkflow.io
MIT License
345 stars 131 forks source link

Implementation of JWTAuthorizationProvider #1116

Closed iamrodrigo closed 3 years ago

iamrodrigo commented 3 years ago

What changed? Implementation of JWTAuthorizationProvider in both worker and client

Why? Part of this proposal

How did you test it? Running the server with oauth file

./cadence-server --env development_oauth start

and modifying cadence-samples

Adding Authorization value in NewClient here

Adding Authorization value in NewDomainClient here

Adding Authorization value in worker.Options here

Potential risks None

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

iamrodrigo commented 3 years ago

@longquanzheng test added :), check internal/common/auth/service_wrapper_test.go and internal/jwt_authorization_test.go

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build ebefd216-b2af-484f-8ba4-55a8796259d8


Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/internal_worker.go 1 3 33.33%
worker/worker.go 0 3 0.0%
internal/client.go 6 10 60.0%
internal/jwt_authorization.go 21 25 84.0%
internal/common/util/rsa.go 0 32 0.0%
<!-- Total: 346 391 88.49% -->
Totals Coverage Status
Change from base Build b792b9b0-c0a6-4a59-9363-e60d3948b178: 0.4%
Covered Lines: 12068
Relevant Lines: 16977

💛 - Coveralls