scp-connector
v0.0.11
Published
This module facilitates the connection from the SAP cloud to an on-premise system via the SAP Cloud Connector.
Downloads
1,296
Readme
scp-connector
This is a module that facilitates the connection from the SAP cloud to an on-premise system via the SAP Cloud Connector.
In general the following steps are taken during a call to an on-premise system. These are also depicted in the proces flow figure.
- User calls an application through the AppRouter, which provides a central point of entry to business applications.
- The request is redirected to XSUAA and the user needs to login. Then a JWT1 (JSON Web Token) is created and sent to the AppRouter.
- The AppRouter forwards the request to the relevant application URL which is defined as destination, it also passes the JWT1 token with credentials.
Then the following steps are relevant for the SCP connector module:
- Connectivity and destination instance
- (a) The module requests a JWT2 to access the destination instance.
- (b) The module requests a JWT3 to access the connectivity instance.
- The module requests the destination configuration by sending JWT2. Including an Authorization header.
- The module sends request to the connectivity instance with JWT3 and the Authorization header.
- SAP Cloud Platform Connectivity forwards request to the Cloud Connector.
- Cloud Connector sends request to the on-premise system.
*Batch requests: Batch requests can be sent by reading the options object with function createSCPOptionsOpbject. The formatted request can then be added as 'body' in the options object. The request can be sent by passing the options object to the npm request module.
Example: options: { "Content-Type": "multipart/mixed; boundary=batch", "body": "" }