Basic Auth - Get Username/Role


I have a web application that is secured via htaccess and htpasswd. Is it possible to get the user / role that is currently logged in with vue?

I would like to control permissions on the page.

Thanks for help.

how did you that? It doesnt work for me.
Could you please share the the htaccess? Thanks