HTTP authorization in Safari using AppleScript

Hello,

Is it possible to make the AppleScript which will be listening for event when Safari HTTP authorization dialog will appear and then fill the authorization datas at the dialog and click OK?

Thank you.

Best regards,
Victor.