LinkedAuth.delete - Python API

Deletes an existing link between a security definition and an SSO user.

API

self.sso.user.delete_linked_auth

delete_linked_auth(self, cid, ust, user_id, auth_type, auth_username, current_app, remote_addr)

Deletes a link between an SSO user and one of its security definitions.

Parameters:
  • cid (string) – Correlation ID used by audit log
  • ust (string) – Current user’s UST
  • user_id (string) – ID of the SSO user to delete a linked account from
  • auth_type (string) – Type of the security definition that is to be unlinked
  • auth_username (string) – Username from the security definition that is to be unlinked
  • current_app (string) – Name of application the call is made from
  • remote_addr (string) – Current user’s remote address
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, print_function, unicode_literals

# Zato

from zato.server.service import Service

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

        # Request metadata
        current_ust = 'gAAAAABc9YDOwa4it_lLu3tHDjdKGdjHHzLTddA_qVIxjT...'
        current_app = 'CRM'
        remote_addr = '127.0.0.1'

        # ID of the user to create a link for
        user_id = 'zusr3tm8jhgqjd9smtdt7erb427s9x'

        # Account to link to the user
        auth_type = 'basic_auth'
        auth_username = 'pubapi'

        # The link shall be active
        is_active = True

        # Create the link
        self.sso.user.delete_linked_auth(self.cid, current_ust, user_id, auth_type,
          auth_username, current_app, remote_addr)