Authentication Against SAP XSUAA from Local
Sometimes, we need to run SAPUI5 applications in the local desktop, and test it base on the remote data from SAP BTP. At the same time, remote BTP data is protected by SAP XSUAA and configured IDP. To access the remote protected data, we need the token issued by IDP. After getting the token, we can attach it to the HTTP header for each data request. Request Token The simplest way to request a token is using postman. By selecting oAuth authentication and provide required information, such as clientid and clientsecret, postman is able to request a token for us. If ui5 tooling is used for local SAPUI5 development, the returned the token by postman can be put into the yaml configuration file. The token info will be sent to remote BTP along with OData requests. One of the drawbacks of this manual approach is we are unable to know whether the token is expired or not. Each issued toke is only valid for a certain period of time which is determined by XSUAA configuration. To overcome this,...