def _get_session_key_payload(_username, _password=None, _return_json=True):
    """This function constructs the payload used to request a session key.

    .. versionadded:: 3.5.0

    :param _username: The username (i.e. login) for the user being authenticated
    :type _username: str
    :param _password: The password for the user being authenticated

                      .. note:: A password is not required if authenticating a secondary user with a previously
                                authenticated Administrator account.

    :type _password: str, None
    :param _return_json: Determines if the session key should be returned in JSON format (``True`` by default)
    :type _return_json: bool
    :returns: A dictionary with the authentication request payload
    """
    _auth_payload = {'user.login': _username}
    if _password:
        _auth_payload.update({'user.password': _password})
    if _return_json:
        _auth_payload.update({'restapi.response_format': 'json'})
    return _auth_payload