Skip to Content

Logout not working (SAP Cloud Platform SDK for Android)

Hi Team,

I am unable to registered/remove ID from HCPMS trial account. I registered device using saml based authentication.

I am using (SAP Cloud Platform SDK for Android) Version 2.0 and I am using below code snippet. Please help me.

public void unRegisterLogic() {
String serviceUrl = "https://hcpms-xxxxxxxxtrial.hanatrial.ondemand.com";
try {
CookieManager.getInstance().removeAllCookies(null);
} catch (Exception e) {
e.printStackTrace();
}
Request request = new Request.Builder()
.post(RequestBody.create(null, ""))
.url(serviceUrl + "/mobileservices/sessions/logout")
.build();

Callback updateUICallback = new Callback() {
@Overridepublic void onFailure(@NonNull Call call, final IOException e) {
Log.d("APP", "Log out failed: " + e.getLocalizedMessage());
}

@Overridepublic void onResponse(@NonNull Call call, final Response response) {
if (response.isSuccessful()) {
Log.d("APP", "Successfully logged out");
} else {
Log.d("APP", "Log out failed " + response.networkResponse());
}
}
};
ClientProvider.get().newCall(request).enqueue(updateUICallback);
}

Regards

Ramakrishna.Amathi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 25 at 06:12 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Mar 26 at 12:24 PM

    Hi Rob,

    I tired above link but i am getting forbidden error.I registered device based on SAML based authentication.

    In HCPMS log getting message "Login with authentication type FORM failed"

    Regards

    Ramakrishna. Amathi


    forbiddenerror.png (25.0 kB)
    Add comment
    10|10000 characters needed characters exceeded