Skip to content

Commit 64b0ae5

Browse files
committed
tests
Signed-off-by: Dmitrii Tikhomirov <[email protected]>
1 parent dcd516c commit 64b0ae5

13 files changed

+1041
-0
lines changed

impl/test/src/test/java/io/serverlessworkflow/impl/test/OpenIDCHTTPWorkflowDefinitionTest.java

Lines changed: 753 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
document:
2+
dsl: '1.0.0-alpha5'
3+
namespace: examples
4+
name: oauth2-authentication
5+
version: '0.1.0'
6+
do:
7+
- getPet:
8+
call: http
9+
with:
10+
method: get
11+
endpoint:
12+
uri: http://localhost:8881/hello
13+
authentication:
14+
oidc:
15+
authority: http://localhost:8888/realms/test-realm/protocol/openid-connect/token
16+
grant: client_credentials
17+
request:
18+
encoding: application/x-www-form-urlencoded
19+
client:
20+
id: ${ .clientId }
21+
secret: ${ .clientSecret }
22+
issuers:
23+
- http://localhost:8888/realms/test-realm
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
document:
2+
dsl: '1.0.0-alpha5'
3+
namespace: examples
4+
name: oauth2-authentication
5+
version: '0.1.0'
6+
do:
7+
- getPet:
8+
call: http
9+
with:
10+
method: get
11+
endpoint:
12+
uri: http://localhost:8881/hello
13+
authentication:
14+
oidc:
15+
authority: http://localhost:8888/realms/test-realm/protocol/openid-connect/token
16+
grant: client_credentials
17+
client:
18+
id: ${ .clientId }
19+
secret: ${ .clientSecret }
20+
issuers:
21+
- http://localhost:8888/realms/test-realm
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
document:
2+
dsl: '1.0.0-alpha5'
3+
namespace: examples
4+
name: oauth2-authentication
5+
version: '0.1.0'
6+
do:
7+
- getPet:
8+
call: http
9+
with:
10+
method: get
11+
endpoint:
12+
uri: http://localhost:8881/hello
13+
authentication:
14+
oidc:
15+
authority: http://localhost:8888/realms/test-realm/protocol/openid-connect/token
16+
grant: password
17+
request:
18+
encoding: application/x-www-form-urlencoded
19+
client:
20+
id: ${ .clientId }
21+
secret: ${ .clientSecret }
22+
username: ${ .username }
23+
password: ${ .password }
24+
scopes:
25+
- pets:read
26+
- pets:write
27+
- pets:delete
28+
- pets:create
29+
audiences: [ serverless-workflow, another-audience, third-audience ]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
document:
2+
dsl: '1.0.0-alpha5'
3+
namespace: examples
4+
name: oauth2-authentication
5+
version: '0.1.0'
6+
do:
7+
- getPet:
8+
call: http
9+
with:
10+
method: get
11+
endpoint:
12+
uri: http://localhost:8881/hello
13+
authentication:
14+
oidc:
15+
authority: http://localhost:8888/realms/test-realm/protocol/openid-connect/token
16+
grant: password
17+
client:
18+
id: ${ .clientId }
19+
secret: ${ .clientSecret }
20+
username: ${ .username }
21+
password: ${ .password }
22+
issuers:
23+
- http://localhost:8888/realms/test-realm
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
document:
2+
dsl: '1.0.0-alpha5'
3+
namespace: examples
4+
name: oauth2-authentication
5+
version: '0.1.0'
6+
do:
7+
- getPet:
8+
call: http
9+
with:
10+
method: get
11+
endpoint:
12+
uri: http://localhost:8881/hello
13+
authentication:
14+
oidc:
15+
authority: http://localhost:8888/realms/test-realm/protocol/openid-connect/token
16+
grant: password
17+
client:
18+
id: serverless-workflow
19+
secret: D0ACXCUKOUrL5YL7j6RQWplMaSjPB8MT
20+
username: serverless-workflow-test
21+
password: serverless-workflow-test
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
document:
2+
dsl: '1.0.0-alpha5'
3+
namespace: examples
4+
name: oauth2-authentication
5+
version: '0.1.0'
6+
do:
7+
- getPet:
8+
call: http
9+
with:
10+
method: get
11+
endpoint:
12+
uri: http://localhost:8881/hello
13+
authentication:
14+
oidc:
15+
authority: http://localhost:8888/realms/test-realm/protocol/openid-connect/token
16+
grant: client_credentials
17+
request:
18+
encoding: application/json
19+
client:
20+
id: serverless-workflow
21+
secret: D0ACXCUKOUrL5YL7j6RQWplMaSjPB8MT
22+
issuers:
23+
- http://localhost:8888/realms/test-realm
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
document:
2+
dsl: '1.0.0-alpha5'
3+
namespace: examples
4+
name: oauth2-authentication
5+
version: '0.1.0'
6+
do:
7+
- getPet:
8+
call: http
9+
with:
10+
method: get
11+
endpoint:
12+
uri: http://localhost:8881/hello
13+
authentication:
14+
oidc:
15+
authority: http://localhost:8888/realms/test-realm/protocol/openid-connect/token
16+
grant: client_credentials
17+
request:
18+
encoding: application/json
19+
client:
20+
id: ${ .clientId }
21+
secret: ${ .clientSecret }
22+
issuers:
23+
- http://localhost:8888/realms/test-realm
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
document:
2+
dsl: '1.0.0-alpha5'
3+
namespace: examples
4+
name: oauth2-authentication
5+
version: '0.1.0'
6+
do:
7+
- getPet:
8+
call: http
9+
with:
10+
method: get
11+
endpoint:
12+
uri: http://localhost:8881/hello
13+
authentication:
14+
oidc:
15+
authority: http://localhost:8888/realms/test-realm/protocol/openid-connect/token
16+
grant: client_credentials
17+
request:
18+
encoding: application/json
19+
client:
20+
id: ${ .clientId }
21+
secret: ${ .clientSecret }
22+
issuers:
23+
- http://localhost:8888/realms/test-realm
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
document:
2+
dsl: '1.0.0-alpha5'
3+
namespace: examples
4+
name: oauth2-authentication
5+
version: '0.1.0'
6+
do:
7+
- getPet:
8+
call: http
9+
with:
10+
method: get
11+
endpoint:
12+
uri: http://localhost:8881/hello
13+
authentication:
14+
oidc:
15+
authority: http://localhost:8888/realms/test-realm/protocol/openid-connect/token
16+
grant: password
17+
request:
18+
encoding: application/json
19+
client:
20+
id: ${ .clientId }
21+
secret: ${ .clientSecret }
22+
username: ${ .username }
23+
password: ${ .password }
24+
scopes:
25+
- pets:read
26+
- pets:write
27+
- pets:delete
28+
- pets:create
29+
audiences: [ serverless-workflow, another-audience, third-audience ]

0 commit comments

Comments
 (0)