All Classes Pages
CustomerLogoutPage Class Reference

Detailed Description

Logout Customer

Overview

This API terminates an existing customer session. This API accepts customer's session ID and terminates the session.
Once the session is terminated, given session ID is no longer valid and cannot be used in any subsequent requests.

Since

   15.0.2

APIs

Method URL Description
POST /ws/v15/context/authentication/user/logout Terminates an existing customer session.

Request

Request headers

Name Description Allowed values Default value
X-egain-session Session ID obtained from Login API response header N/A N/A
Accept Content type accepted by the client. application/xml or application/json N/A
Accept-Language Language locale accepted by client (used for locale specific fields in resource representation and in error responses) Supported 'Accept-Language' header codes default system language

Request Body

Request body is not allowed.

Supported API specific query parameters

   None

Supported common query parameters

   None

Response

Response headers

Name Description Possible values
X-egain-session Session ID that was terminated N/A
Content-Type Media type of response body application/xml or application/json

Response body XML schemas:

  • v15-schema-kb-WSError - used in case of error
  • v15-schema-context-Logout - used in case of success

HTTP status codes

Success Status codes

200 - OK

  • The customer session was successfully terminated.

Failure Status codes

400 - Bad Request

  • Any query parameter is sent in the request.
  • Request body is not empty.

401 - Unauthorized

  • The header X-egain-session is not supplied.
  • The session identified through X-egain-session is not a customer session.
  • The customer session with the value supplied in X-egain-session header is not found.

500 - Internal server error

Examples:

Example 1 - Logout a customer when SP initiated SSO is disabled
Example 2 - Logout a customer when SP initiated SSO is enabled