I am using Gateway to communicate between a web UI front end and a non-SAP back end system.
I have set up an RCF, type G, HTTP External Connection, to the non-SAP system and have chosen Basic Authentication, and left the username and password blank.
From my Gateway service Data Provider class I am calling this RCF using methods from the IF_HTTP_CLIENT Interface. When I turn off authorization in the external server, this all works perfectly, but when I turn it on I can't work out how to pass the password through..
I have found a method "Authenticate" into which I can pass username (sy-uname) and password (??). How do I pass in the password used to login to Gateway? I assume there isn't a method I can call which can retrieve this, as this would be incredibly insecure.. but can I somehow get it from the Gateway call headers? or tell the HTTP client to use the credentials used to access Gateway?
I want to use the credentials used to access Gateway (username and password) to authenticate against my RCF connection - i.e. pass the users credentials through Gateway and out through my RCF connection. But how? I cannot set up an external connection as trusted.
Is there some config I can set-up in SICF where I can say that authentication against the service must be passed though to my RFC connection?
Please make any suggestions. I have tried searching for similar issues and found a few which look a bit similar, but none which help me yet.
Thank you