Skip to Content
0

Logoff from HCP based SAPUI5 Applications

Dec 12, 2017 at 02:01 PM

105

avatar image

I am trying to use the standard logoff Service /sap/public/bc/icf/logoff for logoff on custom button, When i run this

https://webidetesting3880479-XXXXXtrial.dispatcher.hanatrial.ondemand.com/sap/public/bc/icf/logoff

It is giving HTTP Status 404 - Not Found error.

Even tried

window.location.href = "/sap/public/bc/icf/logoff?redirectURL=/sap/bc/bsp/sap/zpocnapp/index.htm";

Best regards, Rohit

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Richard Zhao
Dec 13, 2017 at 08:01 AM
0

Hello, Rohit As far as I know the logoff service base on server level which means it provided by Netweaver server. It seems that the HCP doesn't provide the functionality yet. so when you try to call the link it will response 404. thanks

Share
10 |10000 characters needed characters left characters exceeded
Ivan Mirisola
Dec 22, 2017 at 01:54 PM
0

Hi Rohit,

To perform a logout of your SAPUI5 application on SCP, all you need to do is define a LogoutPage attribute on your neo-app.json descriptor.

"logoutPage": "/logout/logout.html"

Once you have it in place, your button can call this URL and SCP will take care of the rest. Remember to make this resource "unprotected"

"securityConstraints": [
        {
            "permission": "accessUserData",
            "description": "Access User Data",
            "protectedPaths": [
                "/"
            ],
            "excludedPaths": [
                "/logout/**"
            ]
        }
    ]

Here is the doc for this.

Regards,
Ivan

Share
10 |10000 characters needed characters left characters exceeded