def METHOD_NAME(identity: str):
    # NOTE: Creates proxy session for authenticated uses in the api-server.
    # Will be used as temporary solution until common authentication
    # service is in place
    #
    assert client.app
    # Based on aiohttp_session and aiohttp_security
    # HACK to get secret for testing purposes
    session_settings = get_plugin_settings(client.app)
    _fernet = fernet.Fernet(session_settings.SESSION_SECRET_KEY.get_secret_value())
    # builds session cookie
    cookie_name = "osparc.WEBAPI_SESSION"
    cookie_data = json.dumps(
        {
            "created": int(time.time()),  # now
            "session": {"AIOHTTP_SECURITY": identity},
            "path": "/",
            # extras? e.g. expiration
        }
    ).encode("utf-8")
    encrypted_cookie_data = _fernet.encrypt(cookie_data).decode("utf-8")
    return {cookie_name: encrypted_cookie_data}