Send user identity information to the identity manager.

        Raise a ServerError if an error occurs in the request process.

        @param username The logged in user.
        @param json_document The JSON payload for login.

def login(self, username, json_document):
        """Send user identity information to the identity manager.

        Raise a ServerError if an error occurs in the request process.

        @param username The logged in user.
        @param json_document The JSON payload for login.
        """
        url = '{}u/{}'.format(self.url, username)
        make_request(
            url, method='PUT', body=json_document, timeout=self.timeout)