samar-elsayed commented on issue #1267: URL: https://github.com/apache/camel-karavan/issues/1267#issuecomment-2101683327
@mgubaidullin HYG
```
- rest:
id: rest-c531
path: test/v1
consumes: application/json
produces: application/json
bindingMode: auto
post:
- id: post-f13f
disabled: true
path: inquiry
to: direct:Inquiry
consumes: application/json
produces: application/json
bindingMode: auto
enableCORS: true
routeId: inquiry
- id: post-bd88
path: payment
to: direct:Payment
- route:
id: route-a3bb
description: "SP Auth "
nodePrefixId: route-ebf
from:
id: from-0376
uri: timer
parameters:
timerName: gen-auth-token
period: "270000"
steps:
- step:
id: step-0e9f
description: Auth Steps
steps:
- process:
id: process-9c1b
description: AuthReq
ref: AuthReq
- log:
id: log-0413
message: ${body}
- removeHeaders:
id: removeHeaders-b555
description: Remove Camel Headers
pattern: Camel*
- to:
id: to-8d87
description: Auth API
uri: https
parameters:
httpUri: optest.test.net/api/onlinepayment/Authenticate
bridgeEndpoint: true
httpMethod: POST
- process:
id: process-2f31
description: AuthRes
ref: AuthRes
- to:
id: to-3292
description: Cache Auth Token
uri: caffeine-cache
parameters:
action: PUT
cacheName: Auth_Token
key: Auth_Token
maximumSize: 1
initialCapacity: 1
evictionType: time_based
expireAfterAccessTime: "270"
expireAfterWriteTime: "270"
- route:
id: Inquiry
nodePrefixId: route-94b
from:
id: from-18a6
uri: direct
parameters:
name: Inquiry
steps:
- step:
id: step-8b19
description: test Token Validation
steps:
- marshal:
id: marshal-d49b
json:
id: json-64d8
- setProperty:
id: setProperty-d35e
name: InquiryReqBody
expression:
simple:
id: simple-31b3
expression: ${body}
resultType: String
- process:
id: process-268d
description: test Token Req
ref: testTokenReq
- to:
id: to-01c1
description: Keycloak Validation
uri: http
parameters:
httpUri: >-
10.90.7.61:30888/realms/master/protocol/openid-connect/token/introspect
httpMethod: POST
- log:
id: log-da0a
disabled: true
message: After token validation == ${body}
- choice:
id: choice-1e9b
when:
- id: when-56bd
expression:
jsonpath:
id: jsonpath-d058
expression: $[?(@.active == true)]
steps:
- step:
id: Inquiry Steps
description: Inquiry Steps
steps:
- to:
id: to-50cf
description: Get Auth Token
uri: caffeine-cache
parameters:
action: GET
cacheName: Auth_Token
key: Auth_Token
maximumSize: 1
initialCapacity: 1
evictionType: time_based
expireAfterAccessTime: "270"
expireAfterWriteTime: "270"
- log:
id: log-da6b
message: >-
Token is ${body} ====== Inquiry Req body from
BE
is ${exchangeProperty.InquiryReqBody}
- process:
id: process-3b07
description: InquiryReq
ref: InquiryReq
- log:
id: log-67eb
message: Inquiry Req to SP is === ${body}
- to:
id: to-5126
description: Inquiry API
uri: https
parameters:
httpUri:
optest.test.net/api/onlinepayment/Inquiry
bridgeEndpoint: true
httpMethod: POST
- log:
id: log-4fb9
message: Inquiry Res from SP is === ${body}
- process:
id: process-36b9
description: InquiryRes
ref: InquiryRes
- log:
id: log-f5cd
disabled: true
message: Before Unmarshal === ${body}
- setHeaders:
id: setHeaders-c224
headers:
- id: setHeader-2eeb
name: Access-Control-Request-Method
expression:
constant:
id: constant-b672
expression: POST
- id: setHeader-14e2
name: Access-Control-Allow-Headers
expression:
constant:
id: constant-d801
expression: Content-Type
- id: setHeader-4db5
name: Access-Control-Allow-Origin
expression:
simple:
id: simple-d087
expression: "*"
- unmarshal:
id: unmarshal-4468
json:
id: json-2d1c
prettyPrint: true
library: Jackson
- log:
id: log-2503
disabled: true
message: Inquiry Res to BE === ${body}
otherwise:
id: otherwise-acdc
steps:
- process:
id: process-795d
description: Expired test Token
ref: ExpiredtestToken
- route:
id: Payment
nodePrefixId: route-94b
from:
id: from-661f
uri: direct
parameters:
name: Payment
steps:
- step:
id: step-5598
description: test Token Validation
steps:
- marshal:
id: marshal-ba32
json:
id: json-64d8
- setProperty:
id: setProperty-d5ed
name: PaymentReqBody
expression:
simple:
id: simple-31b3
expression: ${body}
resultType: String
- process:
id: process-45d7
description: test Token Req
ref: testTokenReq
- to:
id: to-eb05
description: Keycloak Validation
uri: http
parameters:
httpUri: >-
10.90.7.61:30888/realms/master/protocol/openid-connect/token/introspect
httpMethod: POST
- log:
id: log-5e58
disabled: true
message: after validation == ${body}
- choice:
id: choice-89b1
when:
- id: when-1e9b
expression:
jsonpath:
id: jsonpath-e6ca
expression: $[?(@.active == true)]
steps:
- step:
id: Payment Steps
description: Payment Steps
steps:
- to:
id: to-50cf
description: Get Auth Token
uri: caffeine-cache
parameters:
action: GET
cacheName: Auth_Token
key: Auth_Token
maximumSize: 1
initialCapacity: 1
evictionType: time_based
expireAfterAccessTime: "270"
expireAfterWriteTime: "270"
- log:
id: log-da6b
message: >-
Token is ${body} ====== \n Payment Req body
from
BE is ${exchangeProperty.PaymentReqBody}
- process:
id: process-3b07
description: PaymentReq
ref: PaymentReq
- log:
id: log-67eb
message: Payment Req to SP === ${body}
- to:
id: to-5126
description: Payment API
uri: https
parameters:
httpUri:
optest.test.net/api/onlinepayment/payment
bridgeEndpoint: true
httpMethod: POST
- log:
id: log-4fb9
message: Payment Res from SP === ${body}
- process:
id: process-36b9
description: PaymentRes
ref: PaymentRes
- log:
id: log-f5cd
disabled: true
message: Before Unmarshal === ${body}
- unmarshal:
id: unmarshal-4468
json:
id: json-2d1c
prettyPrint: true
library: Jackson
- log:
id: log-2503
disabled: true
message: After unmarshal === ${body}
otherwise:
id: otherwise-1077
steps:
- process:
id: process-c36d
description: Expired test Token
ref: ExpiredtestToken
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
