on 03-30-2015 9:27 PM
Hi all,
SAP HANA Cloud Platform Docu for user API mentions a logout function. How should I exactly use this? Make a ajax oder OData read request to /userapi/logout ? Redirect the browser to /userapi/logout ?
Thanks for any hints,
Wolfgang
Hi Wolfgang,
when you have made the settings in the neo-app.json file ...
e.g.
"path": "/services/userapi",
"target": {
"type": "service",
"name": "userapi"
},
"description": "UserAPI"
you can do an ajax call for the logout service.
Here is an example calling the logout service for the above service definition within a function called when a button is pressed (the function calls the service and navigates to a "logged out" page after successful service call).
onPressButton: function() {
$.ajax(
{
"url":"/services/userapi/logout",
"success": function(){ sap.ui.getCore().byId("idApp1").to("idView2"); }
});
}
In the browsers developer tools you can see on the network tab if the call was successful.
Best regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.