-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
- Loading branch information
Showing
15 changed files
with
369 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
api/src/main/java/io/serverlessworkflow/serialization/OneOfSetter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2020-Present The Serverless Workflow Specification Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.serverlessworkflow.serialization; | ||
|
||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
@Retention(RUNTIME) | ||
@Target(METHOD) | ||
public @interface OneOfSetter { | ||
Class<?> value(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
api/src/test/resources/features/authentication-bearer-uri-format.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
document: | ||
dsl: '1.0.0-alpha5' | ||
namespace: examples | ||
name: bearer-auth | ||
version: '0.1.0' | ||
do: | ||
- getPet: | ||
call: http | ||
with: | ||
method: get | ||
endpoint: | ||
uri: https://petstore.swagger.io/v2/pet/{petId} | ||
authentication: | ||
bearer: | ||
token: ${ .token } |
15 changes: 15 additions & 0 deletions
15
api/src/test/resources/features/authentication-bearer.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
document: | ||
dsl: '1.0.0-alpha5' | ||
namespace: examples | ||
name: bearer-auth-uri-format | ||
version: '0.1.0' | ||
do: | ||
- getPet: | ||
call: http | ||
with: | ||
method: get | ||
endpoint: | ||
uri: https://petstore.swagger.io/v2/pet/1 | ||
authentication: | ||
bearer: | ||
token: ${ .token } |
18 changes: 18 additions & 0 deletions
18
api/src/test/resources/features/authentication-oauth2-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
document: | ||
dsl: 1.0.0-alpha1 | ||
namespace: examples | ||
name: oauth2-authentication | ||
version: 1.0.0-alpha1 | ||
use: | ||
secrets: | ||
- mySecret | ||
do: | ||
- getPet: | ||
call: http | ||
with: | ||
method: get | ||
endpoint: | ||
uri: https://petstore.swagger.io/v2/pet/{petId} | ||
authentication: | ||
oauth2: | ||
use: mySecret |
22 changes: 22 additions & 0 deletions
22
api/src/test/resources/features/authentication-oauth2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
document: | ||
dsl: '1.0.0-alpha5' | ||
namespace: examples | ||
name: oauth2-authentication | ||
version: '0.1.0' | ||
do: | ||
- getPet: | ||
call: http | ||
with: | ||
method: get | ||
endpoint: | ||
uri: https://petstore.swagger.io/v2/pet/{petId} | ||
authentication: | ||
oauth2: | ||
authority: http://keycloak/realms/fake-authority | ||
endpoints: #optional | ||
token: /auth/token #defaults to /oauth2/token | ||
introspection: /auth/introspect #defaults to /oauth2/introspect | ||
grant: client_credentials | ||
client: | ||
id: workflow-runtime-id | ||
secret: workflow-runtime-secret |
18 changes: 18 additions & 0 deletions
18
api/src/test/resources/features/authentication-oidc-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
document: | ||
dsl: 1.0.0-alpha1 | ||
namespace: examples | ||
name: oidc-authentication | ||
version: 1.0.0-alpha1 | ||
use: | ||
secrets: | ||
- mySecret | ||
do: | ||
- getPet: | ||
call: http | ||
with: | ||
method: get | ||
endpoint: | ||
uri: https://petstore.swagger.io/v2/pet/{petId} | ||
authentication: | ||
oidc: | ||
use: mySecret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
document: | ||
dsl: '1.0.0-alpha5' | ||
namespace: examples | ||
name: oidc-authentication | ||
version: '0.1.0' | ||
do: | ||
- getPet: | ||
call: http | ||
with: | ||
method: get | ||
endpoint: | ||
uri: https://petstore.swagger.io/v2/pet/{petId} | ||
authentication: | ||
oidc: | ||
authority: http://keycloak/realms/fake-authority #endpoints are resolved using the OIDC configuration located at '/.well-known/openid-configuration' | ||
grant: client_credentials | ||
client: | ||
id: workflow-runtime-id | ||
secret: workflow-runtime-secret |
19 changes: 19 additions & 0 deletions
19
api/src/test/resources/features/authentication-reusable.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
document: | ||
dsl: '1.0.0-alpha5' | ||
namespace: examples | ||
name: bearer-auth | ||
version: '0.1.0' | ||
use: | ||
authentications: | ||
petStoreAuth: | ||
bearer: | ||
token: ${ .token } | ||
do: | ||
- getPet: | ||
call: http | ||
with: | ||
method: get | ||
endpoint: | ||
uri: https://petstore.swagger.io/v2/pet/{petId} | ||
authentication: | ||
use: petStoreAuth |
Oops, something went wrong.