Cookies Based Authentication - Confluence

Hello Everyone,

Can anyone please help me how to authenticate confluence session using cookies based implementation similar to jira below
To reproduce the behavior of the Jira log-in page (for example, to display authentication error messages to users) can POST to the /auth/1/session resource.

Thanks!!