How to pass an authentication token from an integration service to other endpoints as part of the header?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

I will be calling an endpoint to which I pass a username and password and it will return a token.

The token will be used as an authorization attribute in the header for all the succeeding endpoint calls.

Hi @Thomvs White​

Sequential Orchestration Service should be perfect for your use case.

For more info on Orchestration services, please refer http://docs.kony.com/konylibrary/integration/kmf_integrationservice_admin_console_userguide/Default.htm#Orchestration_Services.htm%3FTocPath%3D_____7

Would that mean packaging the login api together with each api? That's like logging in for each api call. Correct me if I'm wrong.

Hi @Thomvs White​

All services except Login service can be part of a Concurrent Orchestration Service e.g. Service1.

Login Service and Service1(Concurrent Orchestration Service) can be bundled together as Sequential Orchestration Service.

I see. So how can I share the session token from Login Service to other Orchestration Service, e.g. Service2? Does this mean that if I create another concurrent orchestration service, Service2, that serves a different workflow, I would have to bundle this with Login Service again and get a new session token?

Hi @Thomvs White​

1.You can combine 2 or more concurrent orchestration services into a single orchestration service, which later on can be combined with the login service as sequential orchestration service.

2. You have to define input param for other services e.g. loginToken with the same name as output param e.g. loginToken of login service. Once you make the services sequential, the orchestration service automatically maps the output param of login service as input param for other services.