User.logout - Python API

Logs a user out of an existing SSO session - this makes the user no longer logged into any of the SSO-based applications.

There is no response on success. A ValidationError is raised if input is invalid, for instance, if UST does not exist.

API

self.sso.user.logout

logout(self, cid, ust, current_app, remote_addr)

Logs a user out of an existing SSO session.

Parameters:
  • cid (string) – Correlation ID used by audit log
  • ust (string) – User session token to log out by
  • current_app (string) – Name of application the user is using to log out from SSO
  • remote_addr (string) – User’s remote address
Return type:

None

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, print_function, unicode_literals

# Zato
from zato.server.service import Service

class Logout(Service):
    def handle(self):

      ust = 'gAAAAABak9qaHvm9RCGc6WWpvjl9cT...'
      current_app = 'CRM'
      remote_addr = '127.0.0.1'

      self.sso.user.logout(self.cid, ust, current_app, remote_addr)