cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching User credentials dynamically for External Rest services

phani_poorna
Participant
0 Kudos

Hi All,

Currently we have requirement to develop a custom Fiori App using external Restful Web services. I am able to get the data from the back end using basic authentication. Kindly find the below image for details. I have hard coded one of our back end user credentials in the image below.                                                  

Our back end is having only this basic authentication option to fetch the data. We have only this possibility to fetch back end data. Currently it is working fine with single user credentials. Now my requirement is that i will deploy this app in the front end server. We will be using Single sign on option for our implementation in Front end server. So front end credentials will be same as back end credentials.

After the user logged in from Fiori Client in the mobile. Is there any option to fetch the user credentials in the Java script from the current user session or from cookies so that i consume our back-end Restful service using the dynamic approach.

Please help me out

Regards

Phani Poorna

Accepted Solutions (0)

Answers (2)

Answers (2)

junwu
Active Contributor
0 Kudos

if sso there, why you have to worry this?

phani_poorna
Participant
0 Kudos

Hi Jun Wu,

In the attached image by me, in the request there is a header called authorization. For that i am currently hardcoding one of the backend user credential.In that place i want dynamic picking of credentials based on currently logged in user into launchpad. Thats the actual challenge i am facing.

Regards

Phani Poorna

mathewzdavis
Active Participant
0 Kudos

Hi Phani

Is your created service in an internal system or external?

Thank you

phani_poorna
Participant
0 Kudos

Hi Mathew

It is in the external system.

Regards

Phani Poorna

junwu
Active Contributor
0 Kudos

if sso is there, you don't have to do anything

phani_poorna
Participant
0 Kudos

Hi Jun Wu,

It is in the external system. Our back end system is a JAVA stack system. It is a SAP product on Java stack unlike ABAP stack. More or less it is like a non SAP system.

In order to authenticate or consume our back end services, it is mandatory to pass authorisation header as shown in the given image. Popup will not come to authenticate if i want to call that service unlike Odata when accessed. The call will fail if authentication is not passed properly

Automatic authentication will not happen in our case. We should pass user id and password. As of now it is hard coded with a single back end user credentials in the given image. Now we want that to happen dynamically.

Regards

Phani Poorna

junwu
Active Contributor
0 Kudos

no way to do that man.

junwu
Active Contributor
0 Kudos

do you understand sso?

phani_poorna
Participant
0 Kudos

Yes. Used to login with same credentials for multiple systems.

Ok then in  our case how we can proceed in consuming our webservices?

mathewzdavis
Active Participant
0 Kudos

Hi Phani

Have you uploaded the custom app in launchpad?

Thank you

phani_poorna
Participant
0 Kudos

Hi Mathew,

Actually i am planning to upload, it takes sometime. Meanwhile i am analysing for dynamic authentication.

Currently the service is running fine from Localhost and also binded to views and controls successfully . Is there any wrong in this solution design?

Please help me out

Regards

Phani Poorna