Пример #1
0
    def clear_session(self, id):
        """Terminate a session

        :param id: the target session id
        :rtype: Session
        """
        ApiClient.delete_path(self, '/{0}'.format(id))
Пример #2
0
    def clear_session(self, id):
        """Terminate a session

        :param id: the target session id
        :rtype: Session
        """
        ApiClient.delete_path(self, '/{0}'.format(id))
Пример #3
0
    def delete_app_instance(self, id):
        """Delete app by target id

        :param id: the target app id
        :type id: str
        :return: None
        """
        ApiClient.delete_path(self, '/{0}'.format(id))
Пример #4
0
    def delete_app_instance(self, id):
        """Delete app by target id

        :param id: the target app id
        :type id: str
        :return: None
        """
        ApiClient.delete_path(self, '/{0}'.format(id))
    def unassign_role_from_user(self, uid, rid):
        """Unassigns a role from a user.

        :param uid: User id: str
        :param rid: Role id: str
        :return: None
        """
        ApiClient.delete_path(self, '/{uid}/roles/{rid}'.format(uid=uid,
                                                                rid=rid))
Пример #6
0
    def unassign_admin_role_to_user(self, uid, rid):
        """Unassign an admin role for a single user

        :param uid: the user id
        :type uid: str
        :param rid: the role id to be unassigned to user
        :type rid: str
        :rtype: None
        """
        ApiClient.delete_path(self, '/{0}/roles/{1}'.format(uid, rid))
    def remove_user_from_group_by_id(self, gid, uid):
        """Removes a user from a group by id

        :param gid: the target group id
        :type gid: str
        :param uid: the target user id
        :type uid: str
        :return: None
        """
        ApiClient.delete_path(self, '/{0}/users/{1}'.format(gid, uid))
Пример #8
0
    def reset_factor(self, user_id, user_factor_id):
        """Reset an enrolled factor

        :param user_id: target user id
        :type user_id: str
        :param user_factor_id: target factor id
        :type user_factor_id: str
        :rtype: None
        """
        ApiClient.delete_path(self, '/{0}/factors/{1}'.format(user_id, user_factor_id))
    def remove_app_target_to_app_admin_role(self, uid, rid, app_name):
        """Removes a app target to an APP_ADMIN role assignment.

        :param uid: User id: str
        :param rid: Role id: str
        :param app_name: App name: str
        :return: None
        """
        ApiClient.delete_path(
            self, '/{uid}/roles/{rid}/targets/catalog/apps/{app_name}'.format(
                uid=uid, rid=rid, app_name=app_name))
    def remove_group_target_from_user_admin_role(self, uid, rid, gid):
        """Removes a group target from a USER_ADMIN role assignment.

        :param uid: User id: str
        :param rid: Role id: str
        :param gid: Group id: str
        :return: None
        """
        ApiClient.delete_path(
            self, '/{uid}/roles/{rid}/targets/groups/{gid}'.format(uid=uid,
                                                                   rid=rid,
                                                                   gid=gid))
Пример #11
0
    def delete_app_target_to_app_admin(self, uid, rid, appname):
        """Delete an app target for an APP_ADMIN role assignment

        :param uid: the user id
        :type uid: str
        :param rid: the APP_ADMIN role id
        :type rid: str
        :param appname: the name of the app to be added
        :type appname: str
        :rtype: None
        """
        url = '/{0}/roles/{1}/targets/catalog/apps/{2}'.format(uid, rid, appname)
        ApiClient.delete_path(self, url)
Пример #12
0
    def delete_group_rule(self, rid):
        """Removes a specific group rule by id from your organization

        :param rid: Id of the rule to be deleted
        :type rid: str
        :return: None
        """
        return ApiClient.delete_path(self, '/rules/{0}'.format(rid))
Пример #13
0
    def delete_user(self, uid):
        """Delete user by target id

        :param uid: the target user id
        :type uid: str
        :return: None
        """
        response = ApiClient.delete_path(self, '/{0}'.format(uid))
        return Utils.deserialize(response.text, User)
Пример #14
0
    def delete_group(self, gid):
        """Delete group by target id

        :param gid: the target group id
        :type gid: str
        :return: None
        """
        response = ApiClient.delete_path(self, '/{0}'.format(gid))
        return Utils.deserialize(response.text, UserGroup)
Пример #15
0
    def delete_user(self, uid):
        """Delete user by target id

        :param uid: the target user id
        :type uid: str
        :return: None
        """
        response = ApiClient.delete_path(self, '/{0}'.format(uid))
        return Utils.deserialize(response.text, User)
Пример #16
0
    def delete_group(self, gid):
        """Delete group by target id

        :param gid: the target group id
        :type gid: str
        :return: None
        """
        response = ApiClient.delete_path(self, '/{0}'.format(gid))
        return Utils.deserialize(response.text, UserGroup)
Пример #17
0
    def remove_user_from_group_by_id(self, gid, uid):
        """Remove a user from a group

        :param gid: the target group id
        :type gid: str
        :param uid: the target user id
        :type uid: str
        :return: None
        """
        response = ApiClient.delete_path(self,
                                         '/{0}/users/{1}'.format(gid, uid))
        return Utils.deserialize(response.text, UserGroup)
Пример #18
0
    def delete_user_sessions(self, uid, delete_tokens=False):
        """Removes all active identity provider sessions.
        This forces the user to authenticate on the next operation.
        Optionally revokes OpenID Connect and OAuth refresh and access tokens issued to the user.
        Note: This operation doesn't clear the sessions created for web sign in or native applications.

        :param uid: the target user id
        :type uid: str

        :param delete_tokens: whether to revoke OIDC and OAuth refresh and access tokens. Default: false
        :type delete_tokens: bool
        :return: None
        """

        if not delete_tokens:
            response = ApiClient.delete_path(self, '/{0}/sessions'.format(uid))

        else:
            params = {'oauthTokens': delete_tokens}
            response = ApiClient.delete_path(self,
                                             '/{0}/sessions'.format(uid),
                                             params=params)
        return Utils.deserialize(response.text, DeleteSessionsRequest)